diff --git a/.appveyor.yml b/.appveyor.yml index 552767fb67..e17e625316 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,17 +1,48 @@ environment: - CYG_ROOT: C:\cygwin CYG_MIRROR: http://cygwin.mirror.constant.com - CYG_CACHE: C:\cygwin\var\cache\setup - CYG_BASH: C:\cygwin\bin\bash BINTRAYAPIKEY: secure: uknPzww818XWJiLecwur9p1MfrkACOyx9d3iNrw/TuD89EoPSc8zLqKdPZjWdcQd matrix: + - FLAVOR: squeak.sista.spur + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: squeak.cog.spur + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: squeak.cog.v3 + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: squeak.stack.spur + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: squeak.stack.v3 + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: newspeak.cog.spur + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 - FLAVOR: newspeak.stack.spur + ARCH: win32x86 + CYG_ROOT: C:\cygwin + CYG_SETUP: setup-x86.exe + MINGW_ARCH: i686 + - FLAVOR: squeak.stack.spur + ARCH: win64x64 + CYG_ROOT: C:\cygwin64 + CYG_SETUP: setup-x86_64.exe + MINGW_ARCH: x86_64 matrix: fast_finish: false @@ -23,7 +54,8 @@ clone_depth: 5 install: - ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"' - - 'setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P mingw64-i686-gcc-core,mingw64-i686-gcc-g++,mingw64-i686-headers,mingw64-i686-runtime,zip' + - ps: 'Start-FileDownload "http://cygwin.com/setup-x86_64.exe" -FileName "setup-x86_64.exe"' + - '%CYG_SETUP% -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip' build: false @@ -35,6 +67,6 @@ build: false # build which causes failures as certain functions attempt to redirect # default file handles. Ensure a dummy file descriptor is opened with 'exec'. test_script: - - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 + + +Croquet Smalltalk Virtual Machine + + + false + + + + + + + + diff --git a/build.win32x86/squeak.sista.spur/Croquet.ico b/build.win32x86/squeak.sista.spur/Croquet.ico new file mode 100644 index 0000000000..2063d2205a Binary files /dev/null and b/build.win32x86/squeak.sista.spur/Croquet.ico differ diff --git a/build.win32x86/squeak.sista.spur/Croquet.rc b/build.win32x86/squeak.sista.spur/Croquet.rc new file mode 100644 index 0000000000..a9036140cc --- /dev/null +++ b/build.win32x86/squeak.sista.spur/Croquet.rc @@ -0,0 +1,32 @@ +#ifdef _WIN32 +1 ICON DISCARDABLE "Croquet.ico" +2 ICON DISCARDABLE "Croquet.ico" +3 ICON DISCARDABLE "Croquet.ico" + +1 VERSIONINFO + FILEVERSION FILEVERSIONVALUES + PRODUCTVERSION 5,0,0,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0xaL + FILEOS 0x10001L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilin + BEGIN + VALUE "CompanyName", "Squeak.org\0" + VALUE "FileDescription", "Croquet Cog Spur Virtual Machine\0" + VALUE "FileVersion", FILEVERSIONSTRING + VALUE "LegalCopyright", "Copyright \251 Squeak.org 1996-2014\0" + VALUE "ProductName", "Croquet Cog Spur\0" + VALUE "ProductVersion", "5.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END +#endif diff --git a/build.win32x86/squeak.sista.spur/GreenCogSqueak.ico b/build.win32x86/squeak.sista.spur/GreenCogSqueak.ico new file mode 100644 index 0000000000..f6d03cf9fa Binary files /dev/null and b/build.win32x86/squeak.sista.spur/GreenCogSqueak.ico differ diff --git a/build.win32x86/squeak.sista.spur/Makefile b/build.win32x86/squeak.sista.spur/Makefile new file mode 100644 index 0000000000..e77a6092ca --- /dev/null +++ b/build.win32x86/squeak.sista.spur/Makefile @@ -0,0 +1,9 @@ +############################################################################# +# Makefile for Win32 Cog Spur Squeak VM using gcc-3.4.x and cygwin +# Do make init to allow make -n to function. +############################################################################# + +VM:=Squeak +VMSRCDIR:=../../spursistasrc/vm + +include ../common/Makefile diff --git a/build.win32x86/squeak.sista.spur/NotYetImplemented b/build.win32x86/squeak.sista.spur/NotYetImplemented deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/build.win32x86/squeak.sista.spur/Squeak.def.in b/build.win32x86/squeak.sista.spur/Squeak.def.in new file mode 100755 index 0000000000..070ebef801 --- /dev/null +++ b/build.win32x86/squeak.sista.spur/Squeak.def.in @@ -0,0 +1,3 @@ +; Set the total stack size to 4 megabytes (0x400000), reserving 4Mb and +; committing 64k (0x10000) +STACKSIZE 0x400000,0x10000 diff --git a/build.win32x86/squeak.sista.spur/Squeak.exe.manifest b/build.win32x86/squeak.sista.spur/Squeak.exe.manifest new file mode 100644 index 0000000000..191b3a8cf1 --- /dev/null +++ b/build.win32x86/squeak.sista.spur/Squeak.exe.manifest @@ -0,0 +1,30 @@ + + + +Squeak Smalltalk Virtual Machine + + + false + + + + + + + + diff --git a/build.win32x86/squeak.sista.spur/Squeak.rc b/build.win32x86/squeak.sista.spur/Squeak.rc new file mode 100755 index 0000000000..e176efe95a --- /dev/null +++ b/build.win32x86/squeak.sista.spur/Squeak.rc @@ -0,0 +1,32 @@ +#ifdef _WIN32 +1 ICON DISCARDABLE "GreenCogSqueak.ico" +2 ICON DISCARDABLE "squeak2.ico" +3 ICON DISCARDABLE "squeak3.ico" + +1 VERSIONINFO + FILEVERSION FILEVERSIONVALUES + PRODUCTVERSION 5,0,0,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0xaL + FILEOS 0x10001L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilin + BEGIN + VALUE "CompanyName", "Squeak.org\0" + VALUE "FileDescription", "Squeak Cog Spur Virtual Machine\0" + VALUE "FileVersion", FILEVERSIONSTRING + VALUE "LegalCopyright", "Copyright \251 Squeak.org 1996-2014\0" + VALUE "ProductName", "Squeak Cog Spur\0" + VALUE "ProductVersion", "5.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END +#endif diff --git a/build.win32x86/squeak.sista.spur/mvm b/build.win32x86/squeak.sista.spur/mvm new file mode 100755 index 0000000000..a8e3bf286b --- /dev/null +++ b/build.win32x86/squeak.sista.spur/mvm @@ -0,0 +1,33 @@ +#!/bin/bash -e +A=;D=;F= +if [ $# = 0 ]; then + A=1;D=1;F=1 +else + while getopts 'Aadf?' opt "$@"; do + case $opt in + A) A=1;D=1;F=1;; + a) A=1;; + d) D=1;; + f) F=1;; + *) echo usage $0 [-A] [-a\ [-d] [-f]; exit 0;; + esac + done + if [ "$1" = -- ]; then + if [ "$A$D$F" = "" ]; then + A=1;D=1;F=1 + fi + fi + shift `expr $OPTIND - 1` +fi +if [ -n "$D" ]; then + rm -rf builddbg/vm/*.exe + make $@ debug 2>&1 | tee LOGD +fi +if [ -n "$A" ]; then + rm -rf buildast/vm/*.exe + make $@ assert 2>&1 | tee LOGA +fi +if [ -n "$F" ]; then + rm -rf build/vm/*.exe + make $@ 2>&1 | tee LOGF +fi diff --git a/build.win32x86/squeak.sista.spur/plugins.ext b/build.win32x86/squeak.sista.spur/plugins.ext new file mode 100644 index 0000000000..e59d8e80c7 --- /dev/null +++ b/build.win32x86/squeak.sista.spur/plugins.ext @@ -0,0 +1,9 @@ +# Copied, perhaps edited, from ../../src/examplePlugins.ext +# N.B. SqueakSSL is not ready for prime time. Compiles but does not link fully. +# See platforms/win32/plugins/SqueakSSL/Makefile +EXTERNAL_PLUGINS = \ +BochsIA32Plugin \ +BochsX64Plugin \ +SqueakFFIPrims \ +UUIDPlugin \ +Win32OSProcessPlugin diff --git a/build.win32x86/squeak.sista.spur/plugins.int b/build.win32x86/squeak.sista.spur/plugins.int new file mode 100644 index 0000000000..c234524e85 --- /dev/null +++ b/build.win32x86/squeak.sista.spur/plugins.int @@ -0,0 +1,37 @@ +# Copied, perhaps edited, from ../../src/examplePlugins.int +INTERNAL_PLUGINS = \ +ADPCMCodecPlugin \ +AsynchFilePlugin \ +B3DAcceleratorPlugin \ +B2DPlugin \ +BitBltPlugin \ +BMPReadWriterPlugin \ +CroquetPlugin \ +ZipPlugin \ +DropPlugin \ +DSAPrims \ +FFTPlugin \ +FilePlugin \ +FloatArrayPlugin \ +FloatMathPlugin \ +HostWindowPlugin \ +IA32ABI \ +JoystickTabletPlugin \ +JPEGReaderPlugin \ +JPEGReadWriter2Plugin \ +Klatt \ +LargeIntegers \ +LocalePlugin \ +Matrix2x3Plugin \ +MIDIPlugin \ +MiscPrimitivePlugin \ +Mpeg3Plugin \ +RePlugin \ +SecurityPlugin \ +SerialPlugin \ +SocketPlugin \ +SoundCodecPrims \ +SoundGenerationPlugin \ +SoundPlugin \ +StarSqueakPlugin \ +SurfacePlugin diff --git a/build.win32x86/squeak.sista.spur/squeak.ico b/build.win32x86/squeak.sista.spur/squeak.ico new file mode 100644 index 0000000000..cf96e91964 Binary files /dev/null and b/build.win32x86/squeak.sista.spur/squeak.ico differ diff --git a/build.win64x64/squeak.stack.spur/plugins.ext b/build.win64x64/squeak.stack.spur/plugins.ext index 9ca8dfd9fe..945d042ab9 100644 --- a/build.win64x64/squeak.stack.spur/plugins.ext +++ b/build.win64x64/squeak.stack.spur/plugins.ext @@ -2,7 +2,7 @@ # N.B. SqueakSSL is not ready for prime time. Compiles but does not link fully. # See platforms/win32/plugins/SqueakSSL/Makefile EXTERNAL_PLUGINS = \ +SqueakFFIPrims \ UUIDPlugin \ Win32OSProcessPlugin -#SqueakFFIPrims \ diff --git a/nsspur64src/vm/cogit.h b/nsspur64src/vm/cogit.h index 50ed184c76..bf751ff5f2 100644 --- a/nsspur64src/vm/cogit.h +++ b/nsspur64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -117,15 +117,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/nsspur64src/vm/cogitX64.c b/nsspur64src/vm/cogitX64.c index 5159bcd394..0ff7f9f052 100644 --- a/nsspur64src/vm/cogitX64.c +++ b/nsspur64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -321,8 +321,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -439,7 +439,7 @@ static AbstractInstruction * NoDbgRegParms initializeSharableLiteral(AbstractIns static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal); static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); @@ -949,7 +949,7 @@ static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_ static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -1246,7 +1246,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceDereferenceSelectorIndex; @@ -1256,9 +1256,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1287,7 +1287,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1305,7 +1305,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt disassemblingMethod; static sqInt dynamicSuperSendTrampolines[NumSendTrampolines]; @@ -1862,7 +1862,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1929,10 +1929,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2171,7 +2171,7 @@ isJump(AbstractInstruction * self_in_isJump) compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2314,9 +2314,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - unsigned long reg; + usqIntptr_t reg; sqInt reverse; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2351,9 +2351,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - unsigned long offset; - unsigned long reg; - unsigned long value; + usqIntptr_t offset; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2473,9 +2473,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -2871,7 +2871,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3956,7 +3956,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -4141,9 +4141,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4402,7 +4402,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 3) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4782,8 +4782,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -4880,7 +4880,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt jumpTargetAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -5848,8 +5848,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5919,7 +5919,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5928,7 +5928,7 @@ generateClosedPICPrototype(void) sqInt literal; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; @@ -6016,7 +6016,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6113,14 +6113,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6212,9 +6212,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6306,9 +6306,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6344,8 +6344,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -6365,7 +6365,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6379,7 +6379,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -6949,9 +6949,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -6980,7 +6980,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -8417,7 +8417,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -12230,7 +12230,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -13325,7 +13325,7 @@ genPrimitiveAtPut(void) /* begin JumpBelow: */ jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((sqInt)0xFFFFFFFFU << 3) | 1); + quickConstant6 = (((usqInt)0xFFFFFFFFU << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(CmpCqR, quickConstant6, Arg1Reg); /* begin JumpAbove: */ @@ -13353,7 +13353,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR((((sqInt)0xFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -13384,7 +13384,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR((((sqInt)0xFFFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -13846,7 +13846,7 @@ genPrimitiveMirrorNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 3) | 1); + quickConstant6 = (((usqInt)maxSlots << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -13872,7 +13872,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction15 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -13896,7 +13896,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction17 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 3) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -14267,7 +14267,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((maxSlots * 2) << 3) | 1); + quickConstant6 = (((usqInt)(maxSlots * 2) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -14297,7 +14297,7 @@ genPrimitiveNewWithArg(void) anInstruction9 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -14323,7 +14323,7 @@ genPrimitiveNewWithArg(void) anInstruction13 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 3) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -16188,13 +16188,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction6 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant1 = ((bcpc << 3) | 1); + quickConstant1 = (((usqInt)bcpc << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant1, TempReg); /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant2 = ((numArgs << 3) | 1); + quickConstant2 = (((usqInt)numArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant2, TempReg); /* begin MoveR:Mw:r: */ @@ -16320,7 +16320,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = (((sqInt)1 << 3) | 1); + quickConstant = (((usqInt)1 << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -16331,9 +16331,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = ((((sqInt)1 << 3) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 3) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -16349,7 +16349,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR(((((sqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -17736,7 +17736,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -17762,8 +17762,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - unsigned long reg; - unsigned long value; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -17800,7 +17800,7 @@ concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithC static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -17814,10 +17814,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - unsigned long base; - unsigned long index; + usqIntptr_t base; + usqIntptr_t index; sqInt offset; - unsigned long src; + usqIntptr_t src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -17851,9 +17851,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - unsigned long base; - unsigned long dest; - unsigned long index; + usqIntptr_t base; + usqIntptr_t dest; + usqIntptr_t index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -17888,8 +17888,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -17908,8 +17908,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long offset; - unsigned long operand; + usqIntptr_t offset; + usqIntptr_t operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -17936,8 +17936,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -17951,8 +17951,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - unsigned long r1; - unsigned long r2; + usqIntptr_t r1; + usqIntptr_t r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -17981,47 +17981,47 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long addressOperand5; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t addressOperand5; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; - unsigned long distance; - unsigned long distance1; - unsigned long distance2; - unsigned long distance3; - unsigned long distance4; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; + usqIntptr_t distance; + usqIntptr_t distance1; + usqIntptr_t distance2; + usqIntptr_t distance3; + usqIntptr_t distance4; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -18089,13 +18089,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; - unsigned long offset110; - unsigned long offset111; - unsigned long offset112; - unsigned long offset113; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; + usqIntptr_t offset110; + usqIntptr_t offset111; + usqIntptr_t offset112; + usqIntptr_t offset113; sqInt offset114; sqInt offset115; sqInt offset116; @@ -18114,13 +18114,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset128; sqInt offset129; sqInt offset13; - unsigned long offset14; - unsigned long offset15; + usqIntptr_t offset14; + usqIntptr_t offset15; sqInt offset16; sqInt offset17; - unsigned long offset18; - unsigned long offset19; - unsigned long offset2; + usqIntptr_t offset18; + usqIntptr_t offset19; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -18131,7 +18131,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -18142,91 +18142,91 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; sqInt offset9; - unsigned long operand; - unsigned long operand1; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regDivisor; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regToShift; - unsigned long regToShift1; - unsigned long save0; - unsigned long save01; - unsigned long save1; - unsigned long save11; - unsigned long save12; - unsigned long save13; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; + usqIntptr_t operand; + usqIntptr_t operand1; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regDivisor; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; + usqIntptr_t save0; + usqIntptr_t save01; + usqIntptr_t save1; + usqIntptr_t save11; + usqIntptr_t save12; + usqIntptr_t save13; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip2; sqInt skip3; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; - unsigned long value; - unsigned long value1; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long word; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t word; switch ((self_in_dispatchConcretize->opcode)) { @@ -21329,7 +21329,7 @@ isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc) /* CogX64Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((sqLong) operand)) >= -128) && ((((sqLong) operand)) <= 0x7F)); } @@ -21631,12 +21631,13 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -22199,7 +22200,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -22214,7 +22215,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -22688,7 +22689,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 3) | 1)); + return genPushLiteral((((usqInt)value << 3) | 1)); } @@ -23364,7 +23365,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -23410,7 +23411,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral((((sqInt)1 << 3) | 1)); + return genPushLiteral((((usqInt)1 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -23427,7 +23428,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral((((sqInt)0 << 3) | 1)); + return genPushLiteral((((usqInt)0 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -23471,7 +23472,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 3) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -23768,7 +23769,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23790,15 +23791,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } return 4; } @@ -24021,9 +24022,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 3) | 1)); introspectionDataIndex += 4; return 0; } @@ -24041,17 +24042,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 3) | 1)); introspectionDataIndex += 6; return 0; @@ -24061,7 +24062,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); introspectionDataIndex += 2; } @@ -24653,7 +24654,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25387,13 +25388,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -26736,7 +26737,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 3) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -27203,7 +27204,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 3) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 3) | 1))); } return genSpecialSelectorSend(); } diff --git a/nsspur64src/vm/cointerp.c b/nsspur64src/vm/cointerp.c index 53088e694c..4ff04734bb 100644 --- a/nsspur64src/vm/cointerp.c +++ b/nsspur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -565,7 +565,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -661,7 +661,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -874,7 +874,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1476,7 +1476,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1525,7 +1525,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1570,8 +1570,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1798,8 +1798,8 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1807,7 +1807,7 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1854,7 +1854,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2475,7 +2475,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-nice.1989"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2609,7 +2609,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4511,7 +4511,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5496,7 +5496,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5562,7 +5562,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5628,7 +5628,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5694,7 +5694,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5934,7 +5934,7 @@ interpret(void) l448: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5960,7 +5960,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l450; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l450: /* end internalQuickPrimitiveResponse */; goto l447; } @@ -6100,7 +6100,7 @@ interpret(void) goto l442; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l442: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6270,7 +6270,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6344,7 +6344,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6482,7 +6482,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6919,10 +6919,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7276,7 +7276,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7302,7 +7302,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7339,7 +7339,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7419,7 +7419,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7445,7 +7445,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7482,7 +7482,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7583,7 +7583,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7620,7 +7620,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7764,7 +7764,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7801,7 +7801,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7935,7 +7935,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7972,7 +7972,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8067,7 +8067,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8104,7 +8104,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8196,7 +8196,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8233,7 +8233,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8325,7 +8325,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8362,7 +8362,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8447,7 +8447,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8475,7 +8475,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8512,7 +8512,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8598,7 +8598,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8625,7 +8625,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8662,7 +8662,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8731,7 +8731,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8835,7 +8835,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8872,7 +8872,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9036,7 +9036,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9062,7 +9062,7 @@ interpret(void) } sz = 0; l171: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9086,7 +9086,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9112,7 +9112,7 @@ interpret(void) } sz = 0; l170: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9667,7 +9667,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9693,7 +9693,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9730,7 +9730,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9810,7 +9810,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9836,7 +9836,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9873,7 +9873,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9974,7 +9974,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10011,7 +10011,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10154,7 +10154,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10191,7 +10191,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10325,7 +10325,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10362,7 +10362,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10457,7 +10457,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10494,7 +10494,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10586,7 +10586,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10623,7 +10623,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10715,7 +10715,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10752,7 +10752,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10837,7 +10837,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10865,7 +10865,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10902,7 +10902,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10988,7 +10988,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11015,7 +11015,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11052,7 +11052,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11121,7 +11121,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11225,7 +11225,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11262,7 +11262,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11404,7 +11404,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11430,7 +11430,7 @@ interpret(void) } sz = 0; l292: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11454,7 +11454,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11480,7 +11480,7 @@ interpret(void) } sz = 0; l291: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11757,7 +11757,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12044,7 +12044,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l327; } if (index == InstructionPointerIndex) { @@ -12121,7 +12121,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } break; case 486: /*230*/ @@ -12338,7 +12338,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12405,7 +12405,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12576,7 +12576,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12644,7 +12644,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12884,7 +12884,7 @@ interpret(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -13024,7 +13024,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13050,7 +13050,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l474; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l474: /* end internalQuickPrimitiveResponse */; goto l464; } @@ -13190,7 +13190,7 @@ interpret(void) goto l469; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l469: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13384,7 +13384,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13410,7 +13410,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l486; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l486: /* end internalQuickPrimitiveResponse */; goto l481; } @@ -13550,7 +13550,7 @@ interpret(void) goto l484; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l484: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13850,7 +13850,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13876,7 +13876,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l380; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l380: /* end internalQuickPrimitiveResponse */; goto l382; } @@ -14016,7 +14016,7 @@ interpret(void) goto l378; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l378: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14155,10 +14155,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -14319,7 +14319,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14345,7 +14345,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l405; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l405: /* end internalQuickPrimitiveResponse */; goto l407; } @@ -14485,7 +14485,7 @@ interpret(void) goto l403; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l403: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14871,7 +14871,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14997,7 +14997,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15094,7 +15094,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -15107,7 +15107,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15778,7 +15778,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16186,7 +16186,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -17747,7 +17747,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17985,13 +17985,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -18366,7 +18366,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -19324,7 +19324,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19456,7 +19456,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -19752,7 +19752,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -20509,7 +20509,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -20761,7 +20761,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -21028,7 +21028,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -21094,7 +21094,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -21105,22 +21105,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -21641,7 +21641,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - usqInt theMethodEnd; + sqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -21852,12 +21852,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21891,7 +21891,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -22398,9 +22398,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -22449,7 +22449,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22645,7 +22645,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22883,7 +22883,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23107,7 +23107,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23194,31 +23194,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -23228,66 +23218,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -23309,14 +23246,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23648,7 +23585,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -24060,7 +23997,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -24237,7 +24174,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -24281,7 +24218,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -24327,7 +24264,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -24547,7 +24484,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24926,7 +24863,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24938,7 +24875,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25989,7 +25926,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -26028,7 +25965,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -26069,7 +26006,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -26153,7 +26090,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -26270,7 +26207,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -26428,7 +26365,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -26546,7 +26483,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26654,7 +26591,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26699,14 +26636,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26727,7 +26664,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27111,7 +27048,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27191,11 +27128,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27205,7 +27142,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27244,7 +27181,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -27279,7 +27216,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -27770,7 +27707,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27812,10 +27749,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27823,7 +27760,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27838,28 +27775,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27872,10 +27809,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27883,7 +27820,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27898,28 +27835,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27990,10 +27927,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -28001,7 +27938,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28016,28 +27953,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -28050,10 +27987,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -28061,7 +27998,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28076,28 +28013,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28191,7 +28128,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -28318,10 +28255,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -28329,7 +28266,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28344,28 +28281,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -28377,10 +28314,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -28388,7 +28325,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28403,28 +28340,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28508,7 +28445,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -28817,14 +28754,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -28856,7 +28793,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28875,7 +28812,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29465,7 +29402,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -29752,7 +29689,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29784,7 +29721,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -29898,7 +29835,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29975,7 +29912,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -30028,7 +29965,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -30064,7 +30001,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -30188,7 +30125,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30251,7 +30188,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30478,7 +30415,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30578,7 +30515,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30615,7 +30552,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30674,7 +30611,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -30688,7 +30625,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -30810,7 +30747,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30847,7 +30784,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30923,7 +30860,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30961,7 +30898,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31032,7 +30969,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31070,7 +31007,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31141,7 +31078,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31179,7 +31116,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31250,7 +31187,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31288,7 +31225,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31359,7 +31296,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31397,7 +31334,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31469,7 +31406,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31506,7 +31443,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31574,7 +31511,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31612,7 +31549,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31684,7 +31621,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31721,7 +31658,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31834,7 +31771,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -31874,7 +31811,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -31916,7 +31853,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32039,7 +31976,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -32228,10 +32165,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -32249,7 +32186,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32288,7 +32225,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32306,7 +32243,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -32439,10 +32376,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32564,7 +32501,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32586,7 +32523,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32684,7 +32621,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32706,7 +32643,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32821,7 +32758,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -32892,7 +32829,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -32948,7 +32885,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -32987,7 +32924,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -32995,7 +32932,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -33021,6 +32958,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -33029,7 +32967,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -33037,10 +32975,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -33066,32 +33024,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -33131,7 +33089,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33326,7 +33284,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33356,7 +33314,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33810,7 +33768,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -33839,7 +33797,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33855,7 +33813,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33872,7 +33830,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33953,7 +33911,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -34041,10 +33999,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -34112,7 +34070,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -34448,7 +34406,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34502,7 +34460,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34510,7 +34468,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34584,7 +34542,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -34626,7 +34584,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34657,7 +34615,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -34713,7 +34671,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34914,7 +34872,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -34952,7 +34910,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -35063,7 +35021,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35090,7 +35048,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -35218,7 +35176,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35336,7 +35294,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35587,7 +35545,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35894,7 +35852,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35906,7 +35864,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35955,7 +35913,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35967,7 +35925,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35994,7 +35952,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36006,7 +35964,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36041,7 +35999,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -36137,10 +36095,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36159,7 +36117,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -36416,7 +36374,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36549,7 +36507,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -36591,7 +36549,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36705,7 +36663,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36760,7 +36718,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36943,7 +36901,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -36984,7 +36942,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -37074,7 +37032,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37147,7 +37105,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37163,7 +37121,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37217,7 +37175,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37255,7 +37213,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37271,7 +37229,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37338,7 +37296,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37354,7 +37312,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37418,7 +37376,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -37444,7 +37402,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37482,7 +37440,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37498,7 +37456,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37561,7 +37519,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37577,7 +37535,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37640,7 +37598,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37656,7 +37614,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37719,7 +37677,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37735,7 +37693,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37794,7 +37752,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37832,7 +37790,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37848,7 +37806,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37909,7 +37867,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37925,7 +37883,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37981,7 +37939,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38032,7 +37990,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38048,7 +38006,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38150,14 +38108,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38379,7 +38337,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38459,11 +38417,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -38473,7 +38431,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -38519,7 +38477,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -38556,7 +38514,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38818,7 +38776,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -38869,7 +38827,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -38988,7 +38946,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39233,7 +39191,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39342,7 +39300,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39382,7 +39340,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39424,7 +39382,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39517,7 +39475,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39572,7 +39530,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39659,7 +39617,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -39690,20 +39648,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -39749,7 +39707,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -39768,14 +39726,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -39784,7 +39742,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39934,7 +39892,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39970,7 +39928,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -40008,7 +39966,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -40205,7 +40163,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40560,7 +40518,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -40652,7 +40610,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -40789,7 +40747,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40872,7 +40830,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -40964,7 +40922,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41203,9 +41161,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -41285,7 +41243,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41354,7 +41312,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41399,7 +41357,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41532,7 +41490,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41570,7 +41528,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -41631,7 +41589,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42030,7 +41988,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -42087,9 +42045,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -42624,7 +42582,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42797,7 +42755,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -43069,7 +43027,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43110,7 +43068,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43140,7 +43098,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43542,7 +43500,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43584,7 +43542,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -43639,7 +43597,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43687,7 +43645,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43751,7 +43709,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -43812,7 +43770,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -43866,7 +43824,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -43921,7 +43879,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -44060,7 +44018,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44097,7 +44055,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -44150,7 +44108,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44196,7 +44154,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44234,7 +44192,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -44322,7 +44280,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44360,7 +44318,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44400,7 +44358,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44457,7 +44415,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -45360,7 +45318,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -45533,7 +45491,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45593,7 +45551,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45686,7 +45644,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45896,7 +45854,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46010,7 +45968,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46176,7 +46134,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46559,7 +46517,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46938,7 +46896,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46980,7 +46938,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -47066,7 +47024,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -47216,7 +47174,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47445,7 +47403,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47492,7 +47450,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47541,7 +47499,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -47921,7 +47879,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -47980,7 +47938,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -48053,7 +48011,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48133,7 +48091,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48519,7 +48477,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48557,7 +48515,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48803,7 +48761,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48851,7 +48809,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48901,7 +48859,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48996,7 +48954,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49041,7 +48999,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49088,7 +49046,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49800,7 +49758,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49830,14 +49788,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -49868,7 +49826,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -49920,7 +49878,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -50023,7 +49981,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -50040,7 +49998,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50349,7 +50307,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50387,7 +50345,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50427,7 +50385,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50537,9 +50495,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -50702,9 +50660,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -51856,7 +51814,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51896,7 +51854,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52035,7 +51993,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -52053,7 +52011,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52075,7 +52033,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52111,7 +52069,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -52181,7 +52139,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -52263,7 +52221,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52289,7 +52247,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -52383,7 +52341,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -52523,7 +52481,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52568,7 +52526,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52606,7 +52564,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52700,9 +52658,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52728,7 +52686,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52770,9 +52728,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52798,7 +52756,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52841,9 +52799,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52870,7 +52828,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -52980,9 +52938,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -53101,7 +53059,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -53318,7 +53276,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -53432,7 +53390,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -53498,7 +53456,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -54042,7 +54000,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54079,7 +54037,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54572,7 +54530,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54639,7 +54597,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -54707,7 +54665,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -54750,7 +54708,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54786,7 +54744,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -54846,9 +54804,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -54886,7 +54844,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54900,7 +54858,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54932,7 +54890,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -55039,7 +54997,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -55061,7 +55019,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -55084,7 +55042,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -55105,7 +55063,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -55183,7 +55141,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55220,7 +55178,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55260,7 +55218,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55824,7 +55782,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55870,7 +55828,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55918,7 +55876,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56020,7 +55978,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56073,7 +56031,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56128,7 +56086,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56201,7 +56159,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56246,7 +56204,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56284,7 +56242,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56375,7 +56333,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56418,7 +56376,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56456,7 +56414,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56632,13 +56590,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -56647,9 +56605,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -56808,7 +56766,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56853,7 +56811,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56891,7 +56849,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57038,7 +56996,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57089,7 +57047,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57142,7 +57100,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57241,7 +57199,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57286,7 +57244,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57324,7 +57282,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57455,7 +57413,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57563,9 +57521,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -57612,7 +57570,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57663,9 +57621,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -57712,7 +57670,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57764,9 +57722,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -57814,7 +57772,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -58492,7 +58450,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -58698,7 +58656,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -58792,7 +58750,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -58846,7 +58804,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -58893,7 +58851,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -58930,7 +58888,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -59053,9 +59011,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -59064,9 +59022,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -59103,7 +59061,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -59752,7 +59710,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -59773,7 +59731,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -59902,7 +59860,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -60083,7 +60041,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -60188,7 +60146,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -60311,7 +60269,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -60371,7 +60329,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -60681,7 +60639,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -60694,7 +60652,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -60978,7 +60936,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61014,7 +60972,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61052,7 +61010,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61445,7 +61403,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -62066,7 +62024,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -62607,7 +62565,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -62673,7 +62631,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -62741,7 +62699,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -62795,7 +62753,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -62835,7 +62793,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -62877,7 +62835,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -63258,7 +63216,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -63405,7 +63363,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63549,7 +63507,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -63814,7 +63772,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -64936,7 +64894,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -65246,7 +65204,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -65261,7 +65219,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -65401,7 +65359,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -65506,7 +65464,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -65539,7 +65497,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65675,7 +65633,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65827,7 +65785,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65998,7 +65956,7 @@ lookupMNU(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66163,7 +66121,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66331,7 +66289,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66500,7 +66458,7 @@ lookupOrdinarySend(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66659,7 +66617,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66812,7 +66770,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -66983,10 +66941,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -67423,7 +67381,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -67726,7 +67684,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -67925,7 +67883,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -68050,7 +68008,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -68264,7 +68222,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -68310,7 +68268,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -68355,7 +68313,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -68393,7 +68351,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -68995,7 +68953,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -69306,7 +69264,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -69543,7 +69501,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69782,7 +69740,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -69899,7 +69857,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -70256,7 +70214,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -70289,7 +70247,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -70766,7 +70724,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -70793,11 +70751,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -71716,6 +71674,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -71729,13 +71688,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -71991,7 +71955,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -72134,7 +72098,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -72238,7 +72202,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -72292,8 +72256,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -72303,7 +72267,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -72326,8 +72290,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -72765,7 +72729,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -72784,16 +72748,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -72807,25 +72771,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -72833,7 +72797,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -72894,7 +72858,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72972,10 +72936,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -72983,7 +72947,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -73014,14 +72978,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73174,7 +73138,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -73305,7 +73269,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73542,9 +73506,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -73712,7 +73676,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -73982,7 +73946,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -74062,11 +74026,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -74076,7 +74040,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -74112,7 +74076,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74171,11 +74135,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74185,7 +74149,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -74256,8 +74220,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -74278,7 +74242,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -74445,7 +74409,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74616,7 +74580,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74691,7 +74655,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -74791,7 +74755,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -74860,7 +74824,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -74903,7 +74867,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -75071,7 +75035,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -75125,7 +75089,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -75135,7 +75099,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -75194,7 +75158,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -75487,7 +75451,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -75524,7 +75488,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -75569,12 +75533,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -75810,7 +75774,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -75819,7 +75783,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -75859,7 +75823,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -75899,7 +75863,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75955,11 +75919,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -75969,7 +75933,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -75996,7 +75960,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -76028,7 +75992,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -76280,7 +76244,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -76654,9 +76618,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -76671,7 +76635,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -76698,9 +76662,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -76709,9 +76673,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -76720,7 +76684,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -76732,10 +76696,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -76781,7 +76745,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -76813,9 +76777,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -76884,7 +76848,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -76892,7 +76856,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -76911,7 +76875,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -76919,7 +76883,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76930,12 +76894,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76947,7 +76911,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76958,12 +76922,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -77081,7 +77045,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -77266,17 +77230,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77285,7 +77249,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -77312,80 +77276,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -77395,7 +77359,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77405,15 +77369,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77535,17 +77499,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77569,15 +77533,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -77621,22 +77585,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -77648,43 +77612,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -77692,37 +77656,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -77731,7 +77695,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77740,14 +77704,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -77782,15 +77746,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -77800,13 +77764,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -77859,7 +77823,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -77870,13 +77834,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -77885,7 +77849,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -77896,7 +77860,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77905,7 +77869,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77913,7 +77877,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77922,7 +77886,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77930,7 +77894,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77953,7 +77917,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -78174,7 +78138,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -78228,7 +78192,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -78275,7 +78239,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/nsspur64src/vm/cointerp.h b/nsspur64src/vm/cointerp.h index 36d37556f3..e058929417 100644 --- a/nsspur64src/vm/cointerp.h +++ b/nsspur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -87,7 +87,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -330,8 +330,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -355,7 +355,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/nsspur64src/vm/gcc3x-cointerp.c b/nsspur64src/vm/gcc3x-cointerp.c index 9a619d84c9..68eebe7349 100644 --- a/nsspur64src/vm/gcc3x-cointerp.c +++ b/nsspur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -568,7 +568,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -664,7 +664,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -877,7 +877,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1479,7 +1479,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1528,7 +1528,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1573,8 +1573,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1801,8 +1801,8 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1810,7 +1810,7 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1857,7 +1857,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2478,7 +2478,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-nice.1989"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2612,7 +2612,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4520,7 +4520,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5505,7 +5505,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5571,7 +5571,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5637,7 +5637,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5703,7 +5703,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5943,7 +5943,7 @@ interpret(void) l448: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5969,7 +5969,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l450; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l450: /* end internalQuickPrimitiveResponse */; goto l447; } @@ -6109,7 +6109,7 @@ interpret(void) goto l442; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l442: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6279,7 +6279,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6353,7 +6353,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6491,7 +6491,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6928,10 +6928,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7285,7 +7285,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7311,7 +7311,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7348,7 +7348,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7428,7 +7428,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7454,7 +7454,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7491,7 +7491,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7592,7 +7592,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7629,7 +7629,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7773,7 +7773,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7810,7 +7810,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7944,7 +7944,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7981,7 +7981,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8076,7 +8076,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8113,7 +8113,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8205,7 +8205,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8242,7 +8242,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8334,7 +8334,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8371,7 +8371,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8456,7 +8456,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8484,7 +8484,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8521,7 +8521,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8607,7 +8607,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8634,7 +8634,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8671,7 +8671,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8740,7 +8740,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8844,7 +8844,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8881,7 +8881,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9045,7 +9045,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9071,7 +9071,7 @@ interpret(void) } sz = 0; l171: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9095,7 +9095,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9121,7 +9121,7 @@ interpret(void) } sz = 0; l170: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9676,7 +9676,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9702,7 +9702,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9739,7 +9739,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9819,7 +9819,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9845,7 +9845,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9882,7 +9882,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9983,7 +9983,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10020,7 +10020,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10163,7 +10163,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10200,7 +10200,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10334,7 +10334,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10371,7 +10371,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10466,7 +10466,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10503,7 +10503,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10595,7 +10595,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10632,7 +10632,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10724,7 +10724,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10761,7 +10761,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10846,7 +10846,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10874,7 +10874,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10911,7 +10911,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10997,7 +10997,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11024,7 +11024,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11061,7 +11061,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11130,7 +11130,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11234,7 +11234,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11271,7 +11271,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11413,7 +11413,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11439,7 +11439,7 @@ interpret(void) } sz = 0; l292: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11463,7 +11463,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11489,7 +11489,7 @@ interpret(void) } sz = 0; l291: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11766,7 +11766,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12053,7 +12053,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l327; } if (index == InstructionPointerIndex) { @@ -12130,7 +12130,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } BREAK; CASE(486) /*230*/ @@ -12347,7 +12347,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12414,7 +12414,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12585,7 +12585,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12653,7 +12653,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12893,7 +12893,7 @@ interpret(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -13033,7 +13033,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13059,7 +13059,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l474; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l474: /* end internalQuickPrimitiveResponse */; goto l464; } @@ -13199,7 +13199,7 @@ interpret(void) goto l469; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l469: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13393,7 +13393,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13419,7 +13419,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l486; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l486: /* end internalQuickPrimitiveResponse */; goto l481; } @@ -13559,7 +13559,7 @@ interpret(void) goto l484; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l484: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13859,7 +13859,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13885,7 +13885,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l380; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l380: /* end internalQuickPrimitiveResponse */; goto l382; } @@ -14025,7 +14025,7 @@ interpret(void) goto l378; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l378: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14164,10 +14164,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -14328,7 +14328,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14354,7 +14354,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l405; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l405: /* end internalQuickPrimitiveResponse */; goto l407; } @@ -14494,7 +14494,7 @@ interpret(void) goto l403; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l403: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14880,7 +14880,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15006,7 +15006,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15103,7 +15103,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -15116,7 +15116,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15787,7 +15787,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16195,7 +16195,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -17756,7 +17756,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17994,13 +17994,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -18375,7 +18375,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -19333,7 +19333,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19465,7 +19465,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -19761,7 +19761,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -20518,7 +20518,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -20770,7 +20770,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -21037,7 +21037,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -21103,7 +21103,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -21114,22 +21114,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -21650,7 +21650,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - usqInt theMethodEnd; + sqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -21861,12 +21861,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21900,7 +21900,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -22407,9 +22407,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -22458,7 +22458,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22654,7 +22654,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22892,7 +22892,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23116,7 +23116,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23203,31 +23203,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -23237,66 +23227,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -23318,14 +23255,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23657,7 +23594,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -24069,7 +24006,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -24246,7 +24183,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -24290,7 +24227,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -24336,7 +24273,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -24556,7 +24493,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24935,7 +24872,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24947,7 +24884,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25998,7 +25935,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -26037,7 +25974,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -26078,7 +26015,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -26162,7 +26099,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -26279,7 +26216,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -26437,7 +26374,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -26555,7 +26492,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26663,7 +26600,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26708,14 +26645,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26736,7 +26673,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27120,7 +27057,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27200,11 +27137,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27214,7 +27151,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27253,7 +27190,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -27288,7 +27225,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -27779,7 +27716,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27821,10 +27758,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27832,7 +27769,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27847,28 +27784,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27881,10 +27818,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27892,7 +27829,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27907,28 +27844,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27999,10 +27936,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -28010,7 +27947,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28025,28 +27962,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -28059,10 +27996,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -28070,7 +28007,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28085,28 +28022,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28200,7 +28137,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -28327,10 +28264,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -28338,7 +28275,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28353,28 +28290,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -28386,10 +28323,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -28397,7 +28334,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -28412,28 +28349,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28517,7 +28454,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -28826,14 +28763,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -28865,7 +28802,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28884,7 +28821,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29474,7 +29411,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -29761,7 +29698,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29793,7 +29730,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -29907,7 +29844,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29984,7 +29921,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -30037,7 +29974,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -30073,7 +30010,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -30197,7 +30134,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30260,7 +30197,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30487,7 +30424,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30587,7 +30524,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30624,7 +30561,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30683,7 +30620,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -30697,7 +30634,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -30819,7 +30756,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30856,7 +30793,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30932,7 +30869,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30970,7 +30907,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31041,7 +30978,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31079,7 +31016,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31150,7 +31087,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31188,7 +31125,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31259,7 +31196,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31297,7 +31234,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31368,7 +31305,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31406,7 +31343,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31478,7 +31415,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31515,7 +31452,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31583,7 +31520,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31621,7 +31558,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31693,7 +31630,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31730,7 +31667,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31843,7 +31780,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -31883,7 +31820,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -31925,7 +31862,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32048,7 +31985,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -32237,10 +32174,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -32258,7 +32195,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32297,7 +32234,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32315,7 +32252,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -32448,10 +32385,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32573,7 +32510,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32595,7 +32532,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32693,7 +32630,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32715,7 +32652,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32830,7 +32767,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -32901,7 +32838,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -32957,7 +32894,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -32996,7 +32933,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33004,7 +32941,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -33030,6 +32967,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -33038,7 +32976,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -33046,10 +32984,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -33075,32 +33033,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -33140,7 +33098,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33335,7 +33293,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33365,7 +33323,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33819,7 +33777,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -33848,7 +33806,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33864,7 +33822,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33881,7 +33839,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33962,7 +33920,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -34050,10 +34008,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -34121,7 +34079,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -34457,7 +34415,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34511,7 +34469,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34519,7 +34477,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34593,7 +34551,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -34635,7 +34593,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34666,7 +34624,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -34722,7 +34680,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34923,7 +34881,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -34961,7 +34919,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -35072,7 +35030,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35099,7 +35057,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -35227,7 +35185,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35345,7 +35303,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35596,7 +35554,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35903,7 +35861,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35915,7 +35873,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35964,7 +35922,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35976,7 +35934,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36003,7 +35961,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36015,7 +35973,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36050,7 +36008,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -36146,10 +36104,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36168,7 +36126,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -36425,7 +36383,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36558,7 +36516,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -36600,7 +36558,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36714,7 +36672,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36769,7 +36727,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36952,7 +36910,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -36993,7 +36951,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -37083,7 +37041,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37156,7 +37114,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37172,7 +37130,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37226,7 +37184,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37264,7 +37222,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37280,7 +37238,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37347,7 +37305,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37363,7 +37321,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37427,7 +37385,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -37453,7 +37411,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37491,7 +37449,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37507,7 +37465,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37570,7 +37528,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37586,7 +37544,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37649,7 +37607,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37665,7 +37623,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37728,7 +37686,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37744,7 +37702,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37803,7 +37761,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37841,7 +37799,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37857,7 +37815,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37918,7 +37876,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37934,7 +37892,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37990,7 +37948,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38041,7 +37999,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38057,7 +38015,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38159,14 +38117,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38388,7 +38346,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38468,11 +38426,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -38482,7 +38440,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -38528,7 +38486,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -38565,7 +38523,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38827,7 +38785,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -38878,7 +38836,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -38997,7 +38955,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39242,7 +39200,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39351,7 +39309,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39391,7 +39349,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39433,7 +39391,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39526,7 +39484,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39581,7 +39539,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39668,7 +39626,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -39699,20 +39657,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -39758,7 +39716,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -39777,14 +39735,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -39793,7 +39751,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39943,7 +39901,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39979,7 +39937,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -40017,7 +39975,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -40214,7 +40172,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40569,7 +40527,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -40661,7 +40619,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -40798,7 +40756,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40881,7 +40839,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -40973,7 +40931,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41212,9 +41170,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -41294,7 +41252,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41363,7 +41321,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41408,7 +41366,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41541,7 +41499,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41579,7 +41537,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -41640,7 +41598,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42039,7 +41997,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -42096,9 +42054,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -42633,7 +42591,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42806,7 +42764,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -43078,7 +43036,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43119,7 +43077,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43149,7 +43107,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43551,7 +43509,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43593,7 +43551,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -43648,7 +43606,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43696,7 +43654,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43760,7 +43718,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -43821,7 +43779,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -43875,7 +43833,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -43930,7 +43888,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -44069,7 +44027,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44106,7 +44064,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -44159,7 +44117,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44205,7 +44163,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44243,7 +44201,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -44331,7 +44289,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44369,7 +44327,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44409,7 +44367,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44466,7 +44424,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -45369,7 +45327,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -45542,7 +45500,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45602,7 +45560,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45695,7 +45653,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45905,7 +45863,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46019,7 +45977,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46185,7 +46143,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46568,7 +46526,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46947,7 +46905,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46989,7 +46947,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -47075,7 +47033,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -47225,7 +47183,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47454,7 +47412,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47501,7 +47459,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47550,7 +47508,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -47930,7 +47888,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -47989,7 +47947,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -48062,7 +48020,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48142,7 +48100,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48528,7 +48486,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48566,7 +48524,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48812,7 +48770,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48860,7 +48818,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48910,7 +48868,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49005,7 +48963,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49050,7 +49008,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49097,7 +49055,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49809,7 +49767,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49839,14 +49797,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -49877,7 +49835,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -49929,7 +49887,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -50032,7 +49990,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -50049,7 +50007,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50358,7 +50316,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50396,7 +50354,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50436,7 +50394,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50546,9 +50504,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -50711,9 +50669,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -51865,7 +51823,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51905,7 +51863,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52044,7 +52002,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -52062,7 +52020,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52084,7 +52042,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52120,7 +52078,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -52190,7 +52148,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -52272,7 +52230,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52298,7 +52256,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -52392,7 +52350,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -52532,7 +52490,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52577,7 +52535,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52615,7 +52573,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52709,9 +52667,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52737,7 +52695,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52779,9 +52737,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52807,7 +52765,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52850,9 +52808,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52879,7 +52837,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -52989,9 +52947,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -53110,7 +53068,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -53327,7 +53285,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -53441,7 +53399,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -53507,7 +53465,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -54051,7 +54009,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54088,7 +54046,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54581,7 +54539,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54648,7 +54606,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -54716,7 +54674,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -54759,7 +54717,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54795,7 +54753,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -54855,9 +54813,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -54895,7 +54853,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54909,7 +54867,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54941,7 +54899,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -55048,7 +55006,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -55070,7 +55028,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -55093,7 +55051,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -55114,7 +55072,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -55192,7 +55150,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55229,7 +55187,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55269,7 +55227,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55833,7 +55791,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55879,7 +55837,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55927,7 +55885,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56029,7 +55987,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56082,7 +56040,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56137,7 +56095,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56210,7 +56168,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56255,7 +56213,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56293,7 +56251,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56384,7 +56342,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56427,7 +56385,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56465,7 +56423,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56641,13 +56599,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -56656,9 +56614,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -56817,7 +56775,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56862,7 +56820,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56900,7 +56858,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57047,7 +57005,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57098,7 +57056,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57151,7 +57109,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57250,7 +57208,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57295,7 +57253,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57333,7 +57291,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57464,7 +57422,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57572,9 +57530,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -57621,7 +57579,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57672,9 +57630,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -57721,7 +57679,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57773,9 +57731,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -57823,7 +57781,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -58501,7 +58459,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -58707,7 +58665,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -58801,7 +58759,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -58855,7 +58813,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -58902,7 +58860,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -58939,7 +58897,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -59062,9 +59020,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -59073,9 +59031,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -59112,7 +59070,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -59761,7 +59719,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -59782,7 +59740,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -59911,7 +59869,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -60092,7 +60050,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -60197,7 +60155,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -60320,7 +60278,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -60380,7 +60338,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -60690,7 +60648,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -60703,7 +60661,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -60987,7 +60945,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61023,7 +60981,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61061,7 +61019,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61454,7 +61412,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -62075,7 +62033,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -62616,7 +62574,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -62682,7 +62640,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -62750,7 +62708,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -62804,7 +62762,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -62844,7 +62802,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -62886,7 +62844,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -63267,7 +63225,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -63414,7 +63372,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63558,7 +63516,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -63823,7 +63781,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -64945,7 +64903,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -65255,7 +65213,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -65270,7 +65228,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -65410,7 +65368,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -65515,7 +65473,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -65548,7 +65506,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65684,7 +65642,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65836,7 +65794,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66007,7 +65965,7 @@ lookupMNU(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66172,7 +66130,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66340,7 +66298,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66509,7 +66467,7 @@ lookupOrdinarySend(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66668,7 +66626,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66821,7 +66779,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -66992,10 +66950,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -67432,7 +67390,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -67735,7 +67693,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -67934,7 +67892,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -68059,7 +68017,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -68273,7 +68231,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -68319,7 +68277,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -68364,7 +68322,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -68402,7 +68360,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69004,7 +68962,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -69315,7 +69273,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -69552,7 +69510,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69791,7 +69749,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -69908,7 +69866,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -70265,7 +70223,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -70298,7 +70256,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -70775,7 +70733,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -70802,11 +70760,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -71725,6 +71683,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -71738,13 +71697,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -72000,7 +71964,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -72143,7 +72107,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -72247,7 +72211,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -72301,8 +72265,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -72312,7 +72276,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -72335,8 +72299,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -72774,7 +72738,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -72793,16 +72757,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -72816,25 +72780,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -72842,7 +72806,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -72903,7 +72867,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72981,10 +72945,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -72992,7 +72956,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -73023,14 +72987,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73183,7 +73147,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -73314,7 +73278,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73551,9 +73515,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -73721,7 +73685,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -73991,7 +73955,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -74071,11 +74035,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -74085,7 +74049,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -74121,7 +74085,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74180,11 +74144,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74194,7 +74158,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -74265,8 +74229,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -74287,7 +74251,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -74454,7 +74418,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74625,7 +74589,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74700,7 +74664,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -74800,7 +74764,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -74869,7 +74833,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -74912,7 +74876,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -75080,7 +75044,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -75134,7 +75098,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -75144,7 +75108,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -75203,7 +75167,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -75496,7 +75460,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -75533,7 +75497,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -75578,12 +75542,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -75819,7 +75783,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -75828,7 +75792,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -75868,7 +75832,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -75908,7 +75872,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75964,11 +75928,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -75978,7 +75942,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -76005,7 +75969,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -76037,7 +76001,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -76289,7 +76253,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -76663,9 +76627,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -76680,7 +76644,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -76707,9 +76671,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -76718,9 +76682,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -76729,7 +76693,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -76741,10 +76705,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -76790,7 +76754,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -76822,9 +76786,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -76893,7 +76857,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -76901,7 +76865,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -76920,7 +76884,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -76928,7 +76892,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76939,12 +76903,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76956,7 +76920,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76967,12 +76931,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -77090,7 +77054,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -77275,17 +77239,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77294,7 +77258,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -77321,80 +77285,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -77404,7 +77368,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77414,15 +77378,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77544,17 +77508,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -77578,15 +77542,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -77630,22 +77594,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -77657,43 +77621,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -77701,37 +77665,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -77740,7 +77704,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77749,14 +77713,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -77791,15 +77755,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -77809,13 +77773,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -77868,7 +77832,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -77879,13 +77843,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -77894,7 +77858,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -77905,7 +77869,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77914,7 +77878,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77922,7 +77886,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77931,7 +77895,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77939,7 +77903,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77962,7 +77926,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -78183,7 +78147,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -78237,7 +78201,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -78284,7 +78248,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/nsspur64src/vm/vmCallback.h b/nsspur64src/vm/vmCallback.h index c1e75c4764..6c4fdfda5e 100644 --- a/nsspur64src/vm/vmCallback.h +++ b/nsspur64src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/nsspursrc/vm/cogit.h b/nsspursrc/vm/cogit.h index 50ed184c76..bf751ff5f2 100644 --- a/nsspursrc/vm/cogit.h +++ b/nsspursrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -117,15 +117,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/nsspursrc/vm/cogitARMv5.c b/nsspursrc/vm/cogitARMv5.c index d1a1956f2e..b27f6c3af8 100644 --- a/nsspursrc/vm/cogitARMv5.c +++ b/nsspursrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -327,10 +327,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [5]; + usqIntptr_t machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -447,7 +447,7 @@ static sqInt NoDbgRegParms isAnInstruction(AbstractInstruction * self_in_isAnIns static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -506,7 +506,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms inverseOpcodeFor(AbstractInstruction * self_in_inverseOpcodeFor, sqInt armOpcode); static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); -static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand); +static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCRelativeValueLoad(AbstractInstruction * self_in_isPCRelativeValueLoad, unsigned int instr); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -998,7 +998,7 @@ static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmp static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral); static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static usqInt NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms literalLoadInstructionBytes(AbstractInstruction * self_in_literalLoadInstructionBytes); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); @@ -1290,7 +1290,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceEnclosingObjectTrampoline; @@ -1299,9 +1299,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1334,7 +1334,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1353,7 +1353,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt disassemblingMethod; static sqInt dynamicSuperSendTrampolines[NumSendTrampolines]; @@ -1915,7 +1915,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1989,10 +1989,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2245,7 +2245,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2848,8 +2848,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - unsigned long hiReg; - unsigned long loReg; + usqIntptr_t hiReg; + usqIntptr_t loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2868,7 +2868,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -2915,7 +2915,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - unsigned long flags; + usqIntptr_t flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2945,8 +2945,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - unsigned long srcA; - unsigned long srcB; + usqIntptr_t srcA; + usqIntptr_t srcB; /* NOTE: srcB contains the other mutiplicand at this point. It is OK to use it as the destination for the low part of the result and in fact this saves us moving it later */ @@ -2999,7 +2999,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3128,54 +3128,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord81; sqInt aWord82; sqInt aWord9; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; - unsigned long baseReg2; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; + usqIntptr_t baseReg2; sqInt constant; - unsigned long constant1; - unsigned long constant10; - unsigned long constant11; - unsigned long constant12; - unsigned long constant13; - unsigned long constant14; - unsigned long constant2; - unsigned long constant3; - unsigned long constant4; - unsigned long constant5; - unsigned long constant6; - unsigned long constant7; - unsigned long constant8; - unsigned long constant9; + usqIntptr_t constant1; + usqIntptr_t constant10; + usqIntptr_t constant11; + usqIntptr_t constant12; + usqIntptr_t constant13; + usqIntptr_t constant14; + usqIntptr_t constant2; + usqIntptr_t constant3; + usqIntptr_t constant4; + usqIntptr_t constant5; + usqIntptr_t constant6; + usqIntptr_t constant7; + usqIntptr_t constant8; + usqIntptr_t constant9; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destAddr; - unsigned long destAddr1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destAddr; + usqIntptr_t destAddr1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt distance2; - unsigned long distReg; - unsigned long distReg1; - unsigned long distReg2; - unsigned long dstReg; - unsigned long dstReg1; + usqIntptr_t distReg; + usqIntptr_t distReg1; + usqIntptr_t distReg2; + usqIntptr_t dstReg; + usqIntptr_t dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode2; @@ -3184,7 +3184,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode5; sqInt flagsOrOpcode6; sqInt flagsOrOpcode7; - unsigned long fpReg; + usqIntptr_t fpReg; sqInt hb; sqInt hb1; sqInt hb2; @@ -3230,10 +3230,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3334,7 +3334,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -3350,84 +3350,84 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset31; sqInt offset32; sqInt offset33; - long offset4; + sqIntptr_t offset4; sqInt offset5; sqInt offset6; - long offset7; + sqIntptr_t offset7; sqInt offset8; sqInt offset9; sqInt p; - unsigned long rd; - unsigned long rd1; - unsigned long rd10; - unsigned long rd11; - unsigned long rd12; - unsigned long rd13; - unsigned long rd14; - unsigned long rd15; - unsigned long rd16; - unsigned long rd17; - unsigned long rd18; - unsigned long rd19; - unsigned long rd2; - unsigned long rd20; - unsigned long rd21; - unsigned long rd22; - unsigned long rd23; - unsigned long rd24; - unsigned long rd3; - unsigned long rd4; - unsigned long rd5; - unsigned long rd6; - unsigned long rd7; - unsigned long rd8; - unsigned long rd9; - unsigned long reg; - unsigned long reg1; - unsigned long reg2; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long regA; - unsigned long regB; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long rn; - unsigned long rn1; - unsigned long rn10; - unsigned long rn11; - unsigned long rn12; - unsigned long rn13; - unsigned long rn14; - unsigned long rn15; - unsigned long rn16; - unsigned long rn17; - unsigned long rn18; - unsigned long rn19; - unsigned long rn2; - unsigned long rn20; - unsigned long rn21; - unsigned long rn22; - unsigned long rn23; - unsigned long rn24; - unsigned long rn25; - unsigned long rn26; - unsigned long rn3; - unsigned long rn4; - unsigned long rn5; - unsigned long rn6; - unsigned long rn7; - unsigned long rn8; - unsigned long rn9; + usqIntptr_t rd; + usqIntptr_t rd1; + usqIntptr_t rd10; + usqIntptr_t rd11; + usqIntptr_t rd12; + usqIntptr_t rd13; + usqIntptr_t rd14; + usqIntptr_t rd15; + usqIntptr_t rd16; + usqIntptr_t rd17; + usqIntptr_t rd18; + usqIntptr_t rd19; + usqIntptr_t rd2; + usqIntptr_t rd20; + usqIntptr_t rd21; + usqIntptr_t rd22; + usqIntptr_t rd23; + usqIntptr_t rd24; + usqIntptr_t rd3; + usqIntptr_t rd4; + usqIntptr_t rd5; + usqIntptr_t rd6; + usqIntptr_t rd7; + usqIntptr_t rd8; + usqIntptr_t rd9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg2; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t regA; + usqIntptr_t regB; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t rn; + usqIntptr_t rn1; + usqIntptr_t rn10; + usqIntptr_t rn11; + usqIntptr_t rn12; + usqIntptr_t rn13; + usqIntptr_t rn14; + usqIntptr_t rn15; + usqIntptr_t rn16; + usqIntptr_t rn17; + usqIntptr_t rn18; + usqIntptr_t rn19; + usqIntptr_t rn2; + usqIntptr_t rn20; + usqIntptr_t rn21; + usqIntptr_t rn22; + usqIntptr_t rn23; + usqIntptr_t rn24; + usqIntptr_t rn25; + usqIntptr_t rn26; + usqIntptr_t rn3; + usqIntptr_t rn4; + usqIntptr_t rn5; + usqIntptr_t rn6; + usqIntptr_t rn7; + usqIntptr_t rn8; + usqIntptr_t rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3442,30 +3442,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - unsigned long src; - unsigned long src1; - unsigned long srcAddr; - unsigned long srcAddr1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg16; - unsigned long srcReg17; - unsigned long srcReg18; - unsigned long srcReg19; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcAddr; + usqIntptr_t srcAddr1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg16; + usqIntptr_t srcReg17; + usqIntptr_t srcReg18; + usqIntptr_t srcReg19; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt u; int u1; sqInt u2; @@ -3474,14 +3474,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - long val; - long val1; - unsigned long val2; - long val3; - long val4; - long val5; - long val6; - long val7; + sqIntptr_t val; + sqIntptr_t val1; + usqIntptr_t val2; + sqIntptr_t val3; + sqIntptr_t val4; + sqIntptr_t val5; + sqIntptr_t val6; + sqIntptr_t val7; sqInt value; unsigned int value1; unsigned int value2; @@ -3490,9 +3490,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value5; unsigned int value6; sqInt word; - unsigned long word1; + usqIntptr_t word1; sqInt word2; - unsigned long word3; + usqIntptr_t word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -3558,11 +3558,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget = jumpTarget1; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord43 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord43; instrOffset6 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3592,11 +3592,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget2 = jumpTarget11; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord44 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord44; instrOffset7 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4113,11 +4113,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd2 = rn4; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord45 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord45; instrOffset8 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4211,7 +4211,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val5 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val5) { rot11 = 32 - i13; - immediate14 = (((usqInt) val5) >> i13) | ((((long)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val5) >> i13) | ((((sqIntptr_t)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord46 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn5 << 16) | (rd3 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord46; @@ -4244,11 +4244,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd22 = rn24; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord80 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord80; instrOffset27 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4328,11 +4328,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd4 = rn6; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord47 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord47; instrOffset9 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4416,11 +4416,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd5 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord48 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord48; instrOffset10 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4455,7 +4455,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val6 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val6) { rot12 = 32 - i14; - immediate15 = (((usqInt) val6) >> i14) | ((((long)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); + immediate15 = (((usqInt) val6) >> i14) | ((((sqIntptr_t)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord49 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn8 << 16) | (rd6 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot12) >> 1)) << 8))) | immediate15) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord49; @@ -4488,11 +4488,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd23 = rn25; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord81 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord81; instrOffset28 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4567,11 +4567,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd7 = rn9; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord50 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord50; instrOffset11 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4619,11 +4619,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd8 = rn10; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord51 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord51; instrOffset12 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4717,7 +4717,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i15 = 2; i15 <= 30; i15 += 2) { if ((val7 & (((0xFFU << i15) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i15)))) == val7) { rot13 = 32 - i15; - immediate16 = (((usqInt) val7) >> i15) | ((((long)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); + immediate16 = (((usqInt) val7) >> i15) | ((((sqIntptr_t)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord52 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd9 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate16) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord52; @@ -4750,11 +4750,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd24 = rn26; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord82 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord82; instrOffset29 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4778,11 +4778,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd10 = rn12; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord53 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord53; instrOffset13 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4798,11 +4798,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd11 = rn13; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord54 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord54; instrOffset14 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4818,11 +4818,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd12 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord55 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord55; instrOffset15 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4838,11 +4838,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd13 = rn15; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord56 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord56; instrOffset16 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4858,11 +4858,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd14 = rn16; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord57 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord57; instrOffset17 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4878,11 +4878,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd15 = rn17; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord58 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord58; instrOffset18 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5042,11 +5042,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord36 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord36; instrOffset = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5246,11 +5246,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord213 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord213; instrOffset19 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5275,11 +5275,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord214 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord214; instrOffset20 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5304,11 +5304,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord215 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord215; instrOffset21 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5333,11 +5333,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord216 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord216; instrOffset22 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5388,11 +5388,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord310 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord310; instrOffset23 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5449,11 +5449,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord311 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord311; instrOffset24 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5510,11 +5510,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord312 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord312; instrOffset25 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5560,11 +5560,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord38 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord38; instrOffset1 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5620,11 +5620,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord39 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord39; instrOffset2 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5731,11 +5731,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord40 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord40; instrOffset3 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5822,11 +5822,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord41 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord41; instrOffset4 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); @@ -5905,11 +5905,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord220 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord220; instrOffset26 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -6464,7 +6464,7 @@ isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, s /* CogARMCompiler>>#isInImmediateJumpRange: */ static sqInt NoDbgRegParms -isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand) +isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand) { return (((((int) operand)) >= -33554432) && ((((int) operand)) <= 0x1FFFFFC)); } @@ -6635,11 +6635,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - unsigned long distance; + usqIntptr_t distance; sqInt i; sqInt immediate; sqInt negate; - unsigned long operand; + usqIntptr_t operand; sqInt rot; sqInt value; @@ -6689,11 +6689,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_loadCwInto->dependent))->address))); - assert((abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord1 = ldrrnplusimm(self_in_loadCwInto, destReg, PC, (((((self_in_loadCwInto->dependent))->address)) >= (((self_in_loadCwInto->address)) + 8) ? 1 - : 0), abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); + : 0), SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); ((self_in_loadCwInto->machineCode))[0 / 4] = aWord1; return ((usqInt) (((self_in_loadCwInto->machineCodeSize) = 4))); } @@ -8754,7 +8754,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca sqInt address; usqInt addressFollowingJump; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8940,9 +8940,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -9212,7 +9212,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -9594,8 +9594,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9690,7 +9690,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10654,8 +10654,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) sqInt address1; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -10729,7 +10729,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10737,7 +10737,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10831,7 +10831,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10928,14 +10928,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -11032,9 +11032,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -11126,9 +11126,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -11162,8 +11162,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -11182,7 +11182,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -11191,7 +11191,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -11838,9 +11838,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -11869,7 +11869,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -18044,7 +18044,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -18081,7 +18081,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -18612,7 +18612,7 @@ genPrimitiveMirrorNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant7 = ((maxSlots << 1) | 1); + quickConstant7 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction6 = genoperandoperand(CmpCqR, quickConstant7, Arg0Reg); if (usesOutOfLineLiteral(anInstruction6)) { @@ -18629,7 +18629,7 @@ genPrimitiveMirrorNewWithArg(void) } /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18665,7 +18665,7 @@ genPrimitiveMirrorNewWithArg(void) } /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -19144,7 +19144,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction4 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); if (usesOutOfLineLiteral(anInstruction4)) { @@ -19161,7 +19161,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -19197,7 +19197,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -20109,7 +20109,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -21627,7 +21627,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction6->dependent = locateLiteral(offset)); } /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant3, TempReg); if (usesOutOfLineLiteral(anInstruction7)) { @@ -21641,7 +21641,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction8->dependent = locateLiteral(offset1)); } /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant4, TempReg); if (usesOutOfLineLiteral(anInstruction9)) { @@ -21782,7 +21782,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); if (usesOutOfLineLiteral(anInstruction)) { @@ -21796,9 +21796,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); if (usesOutOfLineLiteral(anInstruction2)) { @@ -21822,7 +21822,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -22615,7 +22615,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - unsigned long literal; + usqIntptr_t literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -22669,7 +22669,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) */ /* CogOutOfLineLiteralsARMCompiler>>#isSharable */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable) { assert(((self_in_isSharable->opcode)) == Literal); @@ -22873,7 +22873,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -23865,7 +23865,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -23883,7 +23883,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ checkLiteralforInstruction(address10, genoperandoperand(MoveRAw, TempReg, address10)); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget1, genoperand(CallFull, callTarget1)); @@ -24389,7 +24389,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -25069,7 +25069,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -25117,7 +25117,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -25134,7 +25134,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -25178,7 +25178,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -25509,15 +25509,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -25742,9 +25742,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -25762,17 +25762,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -25782,7 +25782,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -26041,7 +26041,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -26798,13 +26798,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -28199,7 +28199,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -28693,7 +28693,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/nsspursrc/vm/cogitIA32.c b/nsspursrc/vm/cogitIA32.c index 49d6d0f046..13149e4b5b 100644 --- a/nsspursrc/vm/cogitIA32.c +++ b/nsspursrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -344,8 +344,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -462,7 +462,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -518,7 +518,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); static sqInt NoDbgRegParms jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize); @@ -1254,7 +1254,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceEnclosingObjectTrampoline; @@ -1263,9 +1263,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1298,7 +1298,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1317,7 +1317,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt disassemblingMethod; static sqInt dynamicSuperSendTrampolines[NumSendTrampolines]; @@ -1875,7 +1875,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1947,10 +1947,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2210,7 +2210,7 @@ isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2758,7 +2758,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2772,7 +2772,7 @@ computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -2786,8 +2786,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2800,8 +2800,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2818,8 +2818,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2863,41 +2863,41 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2964,14 +2964,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - unsigned long mask; - unsigned long mask1; - unsigned long mask2; + usqIntptr_t mask; + usqIntptr_t mask1; + usqIntptr_t mask2; sqInt mcIdx; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -2982,7 +2982,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - unsigned long offset12; + usqIntptr_t offset12; sqInt offset120; sqInt offset121; sqInt offset122; @@ -2994,7 +2994,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -3005,108 +3005,108 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; - unsigned long offset9; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg24; - unsigned long reg25; - unsigned long reg26; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS10; - unsigned long regLHS11; - unsigned long regLHS12; - unsigned long regLHS13; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regLHS5; - unsigned long regLHS6; - unsigned long regLHS7; - unsigned long regLHS8; - unsigned long regLHS9; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS10; - unsigned long regRHS11; - unsigned long regRHS12; - unsigned long regRHS13; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regRHS5; - unsigned long regRHS6; - unsigned long regRHS7; - unsigned long regRHS8; - unsigned long regRHS9; - unsigned long regToShift; - unsigned long regToShift1; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; + usqIntptr_t offset9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg24; + usqIntptr_t reg25; + usqIntptr_t reg26; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS10; + usqIntptr_t regLHS11; + usqIntptr_t regLHS12; + usqIntptr_t regLHS13; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regLHS5; + usqIntptr_t regLHS6; + usqIntptr_t regLHS7; + usqIntptr_t regLHS8; + usqIntptr_t regLHS9; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS10; + usqIntptr_t regRHS11; + usqIntptr_t regRHS12; + usqIntptr_t regRHS13; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regRHS5; + usqIntptr_t regRHS6; + usqIntptr_t regRHS7; + usqIntptr_t regRHS8; + usqIntptr_t regRHS9; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; sqInt shiftCount; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt swapreg; - unsigned long value; - unsigned long value1; - unsigned long value10; - unsigned long value11; - unsigned long value12; - unsigned long value13; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long value9; - unsigned long word; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value10; + usqIntptr_t value11; + usqIntptr_t value12; + usqIntptr_t value13; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t value9; + usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { dispatchConcretizeProcessorSpecific(self_in_dispatchConcretize); @@ -5404,25 +5404,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg2; - unsigned long destReg3; - unsigned long offset; - unsigned long offset1; - unsigned long offset2; - unsigned long offset3; - unsigned long reg; - unsigned long reg1; - unsigned long reg11; - unsigned long reg2; - unsigned long reg21; - unsigned long reg3; - unsigned long regDivisor; - unsigned long srcReg; - unsigned long srcReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t offset; + usqIntptr_t offset1; + usqIntptr_t offset2; + usqIntptr_t offset3; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg11; + usqIntptr_t reg2; + usqIntptr_t reg21; + usqIntptr_t reg3; + usqIntptr_t regDivisor; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6547,7 +6547,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) /* CogIA32Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((int) operand)) >= -128) && ((((int) operand)) <= 0x7F)); } @@ -7054,9 +7054,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -8582,7 +8582,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8767,9 +8767,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -9028,7 +9028,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -9356,8 +9356,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9452,7 +9452,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt caseEndAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10399,8 +10399,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10459,7 +10459,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10467,7 +10467,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10557,7 +10557,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10654,14 +10654,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -10753,9 +10753,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -10847,9 +10847,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -10884,8 +10884,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10905,7 +10905,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -10919,7 +10919,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -11495,12 +11495,12 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; - unsigned long fixupSize1; + usqIntptr_t fixupSize; + usqIntptr_t fixupSize1; sqInt numberOfAbstractOpcodes; sqInt numberOfAbstractOpcodes1; - unsigned long opcodeSize; - unsigned long opcodeSize1; + usqIntptr_t opcodeSize; + usqIntptr_t opcodeSize1; sqInt startAddress1; sqInt startAddress2; @@ -11525,7 +11525,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateCheckFeatures(backEnd); outputInstructionsForGeneratedRuntimeAt(startAddress2); recordGeneratedRunTimeaddress("ceCheckFeaturesFunction", startAddress2); - ceCheckFeaturesFunction = ((unsigned long (*)(void)) startAddress2); + ceCheckFeaturesFunction = ((usqIntptr_t (*)(void)) startAddress2); /* begin maybeGenerateICacheFlush */ /* begin generateVMOwnerLockFunctions */ @@ -11546,7 +11546,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -17547,7 +17547,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17578,7 +17578,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -18029,7 +18029,7 @@ genPrimitiveMirrorNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant7 = ((maxSlots << 1) | 1); + quickConstant7 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(CmpCqR, quickConstant7, Arg0Reg); /* begin JumpAbove: */ @@ -18040,7 +18040,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction8 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18066,7 +18066,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction12 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18459,7 +18459,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -18470,7 +18470,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18496,7 +18496,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -19225,7 +19225,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -20405,13 +20405,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -20537,7 +20537,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -20548,9 +20548,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -20566,7 +20566,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -21780,7 +21780,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction111 = genoperand(CallFull, callTarget); abstractInstruction2 = anInstruction111; @@ -21797,7 +21797,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction112 = genoperand(CallFull, callTarget1); abstractInstruction3 = anInstruction112; @@ -22263,7 +22263,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -22924,7 +22924,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin annotateCall: */ anInstruction18 = genoperand(CallFull, callTarget); abstractInstruction = anInstruction18; @@ -22972,7 +22972,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -22989,7 +22989,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -23033,7 +23033,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -23352,15 +23352,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -23581,9 +23581,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -23601,17 +23601,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -23621,7 +23621,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -23880,7 +23880,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -24614,13 +24614,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -25956,7 +25956,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -26422,7 +26422,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/nsspursrc/vm/cogitMIPSEL.c b/nsspursrc/vm/cogitMIPSEL.c index 8a5f9e55cd..183f0c5f78 100644 --- a/nsspursrc/vm/cogitMIPSEL.c +++ b/nsspursrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -373,10 +373,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [7]; + usqIntptr_t machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -490,7 +490,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1398,7 +1398,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceEnclosingObjectTrampoline; @@ -1407,9 +1407,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1442,7 +1442,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1461,7 +1461,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt disassemblingMethod; static sqInt dynamicSuperSendTrampolines[NumSendTrampolines]; @@ -2019,7 +2019,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -2087,10 +2087,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2342,7 +2342,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -3277,7 +3277,7 @@ checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMe usqInt cacheTag1; sqInt classTag; sqInt enclosingObject; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; usqInt entryPoint2; sqInt literal; @@ -3851,7 +3851,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -4036,9 +4036,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4305,7 +4305,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4656,8 +4656,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -4751,7 +4751,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -5708,8 +5708,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5779,7 +5779,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5787,7 +5787,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -5877,7 +5877,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -5974,14 +5974,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6073,9 +6073,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6167,9 +6167,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6203,8 +6203,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -6223,7 +6223,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6232,7 +6232,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -6681,7 +6681,7 @@ static sqInt NoDbgRegParms incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity) { usqInt cacheAddress; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -6808,9 +6808,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -6839,7 +6839,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -8941,7 +8941,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqLong callDelta; - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; sqLong refDelta; @@ -8991,7 +8991,7 @@ relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt ref { usqInt cacheAddress; sqInt callDelta; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -9507,7 +9507,7 @@ static sqInt NoDbgRegParms unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector) { usqInt cacheAddress; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -9661,7 +9661,7 @@ static sqInt NoDbgRegParms unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity) { usqInt cacheAddress; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -9811,7 +9811,7 @@ static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod) { usqInt cacheAddress; - usqInt entryPoint; + sqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -11341,8 +11341,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -11380,8 +11380,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -11411,8 +11411,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -11433,8 +11433,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -11456,8 +11456,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -11487,8 +11487,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -11508,9 +11508,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long dstReg; - unsigned long srcReg; - unsigned long value; + usqIntptr_t dstReg; + usqIntptr_t srcReg; + usqIntptr_t value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -11535,8 +11535,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -11558,8 +11558,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -11575,7 +11575,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -11590,8 +11590,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -11626,9 +11626,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -11659,8 +11659,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -11696,8 +11696,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -11731,9 +11731,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -11763,9 +11763,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -11800,9 +11800,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -11837,9 +11837,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -11874,9 +11874,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -11911,9 +11911,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -11948,9 +11948,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -11985,9 +11985,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -12022,9 +12022,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -12130,8 +12130,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - unsigned long dividendReg; - unsigned long divisorReg; + usqIntptr_t dividendReg; + usqIntptr_t divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -12280,7 +12280,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -12381,8 +12381,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -12412,7 +12412,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -12427,8 +12427,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -12444,7 +12444,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -12459,8 +12459,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -12478,8 +12478,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -12511,8 +12511,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -12541,7 +12541,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -12561,7 +12561,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -12580,7 +12580,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12594,7 +12594,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12608,9 +12608,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -12626,9 +12626,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -12648,8 +12648,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -12684,8 +12684,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -12717,8 +12717,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -12747,9 +12747,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -12765,9 +12765,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -12783,9 +12783,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - unsigned long baseReg; + usqIntptr_t baseReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -12801,8 +12801,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -12818,9 +12818,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -12841,9 +12841,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -12866,9 +12866,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; /* index is number of *bytes* */ @@ -12891,9 +12891,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -12919,8 +12919,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -12946,7 +12946,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12970,8 +12970,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -12992,8 +12992,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -13015,8 +13015,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -13032,7 +13032,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13048,7 +13048,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -13081,7 +13081,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -13105,7 +13105,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13165,8 +13165,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -13204,8 +13204,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -13235,8 +13235,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -13257,8 +13257,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -13280,8 +13280,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -13296,8 +13296,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -13317,8 +13317,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -13350,8 +13350,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -13373,8 +13373,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -14610,9 +14610,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - unsigned long newBranchLeft; + usqIntptr_t newBranchLeft; sqInt newBranchOpcode; - unsigned long newBranchRight; + usqIntptr_t newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -14932,7 +14932,7 @@ relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeRet static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) { - usqInt newTarget; + sqInt newTarget; usqInt oldTarget; assert((delta % 4) == 0); @@ -15303,7 +15303,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -17024,7 +17024,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17055,7 +17055,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17506,7 +17506,7 @@ genPrimitiveMirrorNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant7 = ((maxSlots << 1) | 1); + quickConstant7 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(CmpCqR, quickConstant7, Arg0Reg); /* begin JumpAbove: */ @@ -17517,7 +17517,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction8 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17543,7 +17543,7 @@ genPrimitiveMirrorNewWithArg(void) anInstruction12 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17936,7 +17936,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -17947,7 +17947,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17973,7 +17973,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -19839,13 +19839,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -19971,7 +19971,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -19982,9 +19982,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -20000,7 +20000,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -21209,7 +21209,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -21224,7 +21224,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -21673,7 +21673,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -22343,7 +22343,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -22391,7 +22391,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -22408,7 +22408,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -22452,7 +22452,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -22771,15 +22771,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -23000,9 +23000,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -23020,17 +23020,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -23040,7 +23040,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -23299,7 +23299,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -24030,13 +24030,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -25389,7 +25389,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -25855,7 +25855,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/nsspursrc/vm/cointerp.c b/nsspursrc/vm/cointerp.c index 55adb071c5..1c7ce65f85 100644 --- a/nsspursrc/vm/cointerp.c +++ b/nsspursrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -564,7 +564,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -660,7 +660,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -854,7 +855,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1452,7 +1453,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1501,7 +1502,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1546,8 +1547,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1774,8 +1775,8 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1783,7 +1784,7 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1830,7 +1831,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2451,7 +2452,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-nice.1989"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2581,7 +2582,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4483,7 +4484,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5468,7 +5469,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5534,7 +5535,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5600,7 +5601,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5666,7 +5667,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5908,7 +5909,7 @@ interpret(void) l454: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5934,7 +5935,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l456; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l456: /* end internalQuickPrimitiveResponse */; goto l453; } @@ -6074,7 +6075,7 @@ interpret(void) goto l448; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l448: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6244,7 +6245,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6318,7 +6319,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6456,7 +6457,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6893,10 +6894,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7241,7 +7242,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7341,7 +7342,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8068,7 +8069,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8176,7 +8177,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8275,7 +8276,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8386,7 +8387,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l156; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8463,7 +8464,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8653,7 +8654,7 @@ interpret(void) } sz = 0; l174: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8703,7 +8704,7 @@ interpret(void) } sz = 0; l173: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9255,7 +9256,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9355,7 +9356,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10081,7 +10082,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10189,7 +10190,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10288,7 +10289,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10399,7 +10400,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l280; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10476,7 +10477,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10644,7 +10645,7 @@ interpret(void) } sz = 0; l298: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10694,7 +10695,7 @@ interpret(void) } sz = 0; l297: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10971,7 +10972,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11258,7 +11259,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l333; } if (index == InstructionPointerIndex) { @@ -11335,7 +11336,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } break; case 486: /*230*/ @@ -11552,7 +11553,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11619,7 +11620,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11790,7 +11791,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11858,7 +11859,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12244,7 +12245,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12270,7 +12271,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l480; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l480: /* end internalQuickPrimitiveResponse */; goto l470; } @@ -12410,7 +12411,7 @@ interpret(void) goto l475; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l475: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -12606,7 +12607,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12632,7 +12633,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l492; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l492: /* end internalQuickPrimitiveResponse */; goto l487; } @@ -12772,7 +12773,7 @@ interpret(void) goto l490; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l490: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13074,7 +13075,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13100,7 +13101,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l386; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l386: /* end internalQuickPrimitiveResponse */; goto l388; } @@ -13240,7 +13241,7 @@ interpret(void) goto l384; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l384: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13379,10 +13380,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13545,7 +13546,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13571,7 +13572,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l411; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l411: /* end internalQuickPrimitiveResponse */; goto l413; } @@ -13711,7 +13712,7 @@ interpret(void) goto l409; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l409: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14097,7 +14098,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14223,7 +14224,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14320,7 +14321,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14333,7 +14334,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15004,7 +15005,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16989,7 +16990,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17227,13 +17228,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -17608,7 +17609,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18566,7 +18567,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19759,7 +19760,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19977,9 +19978,8 @@ mnuMethodOrNilFor(sqInt rcvr) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; - sqInt fieldIndex; sqInt hash; - usqInt index; + sqInt index; usqInt length; usqInt mask; sqInt methodArray; @@ -20035,7 +20035,7 @@ mnuMethodOrNilFor(sqInt rcvr) hash)))); wrapAround = 0; while (1) { - nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { mnuMethod = null; goto l5; @@ -20053,11 +20053,10 @@ mnuMethodOrNilFor(sqInt rcvr) } methodArray = objOop2; /* begin followField:ofObject: */ - fieldIndex = index - SelectorStart; - objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); if (((objOop1 & (tagMask())) == 0) && (((longAt(objOop1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop1 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop1); + objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1); } mnuMethod = objOop1; goto l5; @@ -20282,7 +20281,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -20403,7 +20402,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -20412,10 +20411,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -20459,6 +20458,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -21238,12 +21238,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21277,7 +21277,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21835,7 +21835,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22031,7 +22031,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22269,7 +22269,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22493,7 +22493,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22586,83 +22586,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22685,14 +22616,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23038,7 +22969,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23450,7 +23381,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -23937,7 +23868,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -24316,7 +24247,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -24328,7 +24259,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25543,7 +25474,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -25660,7 +25591,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25937,7 +25868,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26051,6 +25982,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -26059,7 +26069,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26104,14 +26114,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26132,7 +26142,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26619,11 +26629,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26712,7 +26722,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -27238,7 +27248,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27280,10 +27290,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27291,7 +27301,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27306,28 +27316,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27340,10 +27350,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27351,7 +27361,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27366,28 +27376,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27458,10 +27468,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27469,7 +27479,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27484,28 +27494,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27518,10 +27528,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27529,7 +27539,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27544,28 +27554,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27666,7 +27676,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -27833,10 +27843,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27844,7 +27854,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27859,28 +27869,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27892,10 +27902,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27903,7 +27913,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27918,28 +27928,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28023,7 +28033,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -28337,7 +28347,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -28458,7 +28468,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28477,7 +28487,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29577,7 +29587,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -29790,7 +29800,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29853,7 +29863,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -30117,7 +30127,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31596,10 +31606,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31617,7 +31627,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31656,7 +31666,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31674,7 +31684,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -31807,10 +31817,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31930,7 +31940,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32095,7 +32105,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32124,7 +32134,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32269,7 +32279,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -32340,7 +32350,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -32435,7 +32445,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32477,7 +32487,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32485,10 +32495,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32518,28 +32532,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32579,7 +32593,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -32776,7 +32790,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -32806,7 +32820,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33275,7 +33289,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -33304,7 +33318,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33320,7 +33334,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33337,7 +33351,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33418,7 +33432,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -33506,10 +33520,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33577,7 +33591,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -33911,7 +33925,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33965,7 +33979,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33973,7 +33987,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34176,7 +34190,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34523,7 +34537,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35050,7 +35064,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -35357,7 +35371,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35369,7 +35383,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35418,7 +35432,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35430,7 +35444,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35457,7 +35471,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35469,7 +35483,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35504,7 +35518,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35600,10 +35614,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36059,7 +36073,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -36215,7 +36229,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36270,7 +36284,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36513,7 +36527,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -36603,7 +36617,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36966,11 +36980,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37066,7 +37080,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37535,7 +37549,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -37803,7 +37817,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38087,7 +38101,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38142,7 +38156,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38229,7 +38243,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -38260,20 +38274,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -38338,14 +38352,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38354,7 +38368,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39692,9 +39706,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -42406,7 +42420,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -42715,7 +42729,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -46268,7 +46282,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - sqInt bytes; + usqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -48502,7 +48516,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51882,7 +51896,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -51946,7 +51960,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -52416,7 +52430,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt chunkBytes; + usqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -55896,7 +55910,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57347,7 +57361,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58165,7 +58179,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58186,7 +58200,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -58315,7 +58329,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58784,7 +58798,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -58902,8 +58916,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -59094,7 +59108,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -59107,7 +59121,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -59205,7 +59219,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -59858,7 +59872,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -60479,7 +60493,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61669,7 +61683,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -61829,7 +61843,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63372,7 +63386,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -63975,7 +63989,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65231,9 +65245,8 @@ lookupSelectorinClass(sqInt selector, sqInt class) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; - sqInt fieldIndex; sqInt hash; - usqInt index; + sqInt index; usqInt length; usqInt mask; sqInt meth; @@ -65286,7 +65299,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) hash)))); wrapAround = 0; while (1) { - nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { meth = null; goto l6; @@ -65304,11 +65317,10 @@ lookupSelectorinClass(sqInt selector, sqInt class) } methodArray = objOop2; /* begin followField:ofObject: */ - fieldIndex = index - SelectorStart; - objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); if (((objOop11 & (tagMask())) == 0) && (((longAt(objOop11)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop11 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop11); + objOop11 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop11); } meth = objOop11; goto l6; @@ -65437,10 +65449,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -65877,7 +65889,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -66213,7 +66225,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -66442,7 +66454,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -67561,7 +67573,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68803,7 +68815,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -69280,7 +69292,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -69307,11 +69319,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -69688,7 +69700,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -70230,6 +70242,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -70243,13 +70256,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70645,7 +70663,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70749,7 +70767,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70803,8 +70821,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70814,7 +70832,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70837,8 +70855,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -71292,7 +71310,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -71311,16 +71329,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -71334,25 +71352,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -71360,7 +71378,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -71503,10 +71521,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -71584,7 +71602,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -71744,7 +71762,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -72635,11 +72653,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72784,11 +72802,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72910,8 +72928,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -73345,7 +73363,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -73779,7 +73797,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73789,7 +73807,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73848,7 +73866,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -74223,12 +74241,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -74464,7 +74482,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -74473,7 +74491,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -74513,7 +74531,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -74613,11 +74631,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74695,7 +74713,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -75362,7 +75380,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -75377,7 +75395,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -75404,9 +75422,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -75415,9 +75433,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -75426,7 +75444,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -75438,7 +75456,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -75527,7 +75545,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -75561,7 +75579,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75630,7 +75648,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75638,7 +75656,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75657,7 +75675,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75665,7 +75683,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75676,12 +75694,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75693,7 +75711,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75811,7 +75829,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -75997,17 +76015,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76016,7 +76034,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -76043,80 +76061,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -76126,7 +76144,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76136,15 +76154,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76266,17 +76284,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76300,15 +76318,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -76352,22 +76370,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -76379,43 +76397,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -76423,37 +76441,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -76462,7 +76480,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76471,14 +76489,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -76513,15 +76531,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -76531,13 +76549,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -76589,7 +76607,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -76600,13 +76618,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -76615,7 +76633,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76626,7 +76644,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76635,7 +76653,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76643,7 +76661,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76652,7 +76670,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76660,7 +76678,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76683,7 +76701,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/nsspursrc/vm/cointerp.h b/nsspursrc/vm/cointerp.h index b47b978a87..86ba836c6d 100644 --- a/nsspursrc/vm/cointerp.h +++ b/nsspursrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -87,7 +87,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -329,8 +329,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -354,7 +354,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/nsspursrc/vm/gcc3x-cointerp.c b/nsspursrc/vm/gcc3x-cointerp.c index 65d03b8029..82a0e0d8e7 100644 --- a/nsspursrc/vm/gcc3x-cointerp.c +++ b/nsspursrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -567,7 +567,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -663,7 +663,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -857,7 +858,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1455,7 +1456,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1504,7 +1505,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1549,8 +1550,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1777,8 +1778,8 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1786,7 +1787,7 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1833,7 +1834,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2454,7 +2455,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-nice.1989"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2584,7 +2585,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4492,7 +4493,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5477,7 +5478,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5543,7 +5544,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5609,7 +5610,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5675,7 +5676,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5917,7 +5918,7 @@ interpret(void) l454: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5943,7 +5944,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l456; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l456: /* end internalQuickPrimitiveResponse */; goto l453; } @@ -6083,7 +6084,7 @@ interpret(void) goto l448; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l448: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6253,7 +6254,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6327,7 +6328,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6465,7 +6466,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6902,10 +6903,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7250,7 +7251,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7350,7 +7351,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8077,7 +8078,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8185,7 +8186,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8284,7 +8285,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8395,7 +8396,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l156; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8472,7 +8473,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8662,7 +8663,7 @@ interpret(void) } sz = 0; l174: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8712,7 +8713,7 @@ interpret(void) } sz = 0; l173: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9264,7 +9265,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9364,7 +9365,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10090,7 +10091,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10198,7 +10199,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10297,7 +10298,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10408,7 +10409,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l280; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10485,7 +10486,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10653,7 +10654,7 @@ interpret(void) } sz = 0; l298: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10703,7 +10704,7 @@ interpret(void) } sz = 0; l297: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10980,7 +10981,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11267,7 +11268,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l333; } if (index == InstructionPointerIndex) { @@ -11344,7 +11345,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } BREAK; CASE(486) /*230*/ @@ -11561,7 +11562,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11628,7 +11629,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11799,7 +11800,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11867,7 +11868,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12253,7 +12254,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12279,7 +12280,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l480; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l480: /* end internalQuickPrimitiveResponse */; goto l470; } @@ -12419,7 +12420,7 @@ interpret(void) goto l475; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l475: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -12615,7 +12616,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12641,7 +12642,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l492; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l492: /* end internalQuickPrimitiveResponse */; goto l487; } @@ -12781,7 +12782,7 @@ interpret(void) goto l490; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l490: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13083,7 +13084,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13109,7 +13110,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l386; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l386: /* end internalQuickPrimitiveResponse */; goto l388; } @@ -13249,7 +13250,7 @@ interpret(void) goto l384; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l384: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13388,10 +13389,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13554,7 +13555,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13580,7 +13581,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l411; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l411: /* end internalQuickPrimitiveResponse */; goto l413; } @@ -13720,7 +13721,7 @@ interpret(void) goto l409; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l409: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14106,7 +14107,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14232,7 +14233,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14329,7 +14330,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14342,7 +14343,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15013,7 +15014,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16998,7 +16999,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17236,13 +17237,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -17617,7 +17618,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18575,7 +18576,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19768,7 +19769,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19986,9 +19987,8 @@ mnuMethodOrNilFor(sqInt rcvr) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; - sqInt fieldIndex; sqInt hash; - usqInt index; + sqInt index; usqInt length; usqInt mask; sqInt methodArray; @@ -20044,7 +20044,7 @@ mnuMethodOrNilFor(sqInt rcvr) hash)))); wrapAround = 0; while (1) { - nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { mnuMethod = null; goto l5; @@ -20062,11 +20062,10 @@ mnuMethodOrNilFor(sqInt rcvr) } methodArray = objOop2; /* begin followField:ofObject: */ - fieldIndex = index - SelectorStart; - objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); if (((objOop1 & (tagMask())) == 0) && (((longAt(objOop1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop1 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop1); + objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1); } mnuMethod = objOop1; goto l5; @@ -20291,7 +20290,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -20412,7 +20411,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -20421,10 +20420,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -20468,6 +20467,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -21247,12 +21247,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21286,7 +21286,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21844,7 +21844,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22040,7 +22040,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22278,7 +22278,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22502,7 +22502,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22595,83 +22595,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22694,14 +22625,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23047,7 +22978,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23459,7 +23390,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -23946,7 +23877,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -24325,7 +24256,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -24337,7 +24268,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25552,7 +25483,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -25669,7 +25600,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25946,7 +25877,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26060,6 +25991,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -26068,7 +26078,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26113,14 +26123,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26141,7 +26151,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26628,11 +26638,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26721,7 +26731,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -27247,7 +27257,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27289,10 +27299,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27300,7 +27310,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27315,28 +27325,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27349,10 +27359,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27360,7 +27370,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27375,28 +27385,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27467,10 +27477,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27478,7 +27488,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27493,28 +27503,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27527,10 +27537,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27538,7 +27548,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27553,28 +27563,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27675,7 +27685,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -27842,10 +27852,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27853,7 +27863,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27868,28 +27878,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27901,10 +27911,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27912,7 +27922,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27927,28 +27937,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28032,7 +28042,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -28346,7 +28356,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -28467,7 +28477,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28486,7 +28496,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29586,7 +29596,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -29799,7 +29809,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29862,7 +29872,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -30126,7 +30136,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31605,10 +31615,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31626,7 +31636,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31665,7 +31675,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31683,7 +31693,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -31816,10 +31826,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31939,7 +31949,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32104,7 +32114,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32133,7 +32143,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32278,7 +32288,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -32349,7 +32359,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -32444,7 +32454,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32486,7 +32496,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32494,10 +32504,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32527,28 +32541,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32588,7 +32602,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -32785,7 +32799,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -32815,7 +32829,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33284,7 +33298,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -33313,7 +33327,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33329,7 +33343,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33346,7 +33360,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33427,7 +33441,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -33515,10 +33529,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33586,7 +33600,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -33920,7 +33934,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33974,7 +33988,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33982,7 +33996,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34185,7 +34199,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34532,7 +34546,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35059,7 +35073,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -35366,7 +35380,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35378,7 +35392,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35427,7 +35441,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35439,7 +35453,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35466,7 +35480,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35478,7 +35492,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35513,7 +35527,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35609,10 +35623,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36068,7 +36082,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -36224,7 +36238,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36279,7 +36293,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36522,7 +36536,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -36612,7 +36626,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36975,11 +36989,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37075,7 +37089,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37544,7 +37558,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -37812,7 +37826,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38096,7 +38110,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38151,7 +38165,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38238,7 +38252,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -38269,20 +38283,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -38347,14 +38361,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38363,7 +38377,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39701,9 +39715,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -42415,7 +42429,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -42724,7 +42738,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -46277,7 +46291,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - sqInt bytes; + usqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -48511,7 +48525,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51891,7 +51905,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -51955,7 +51969,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -52425,7 +52439,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt chunkBytes; + usqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -55905,7 +55919,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57356,7 +57370,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58174,7 +58188,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58195,7 +58209,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -58324,7 +58338,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58793,7 +58807,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -58911,8 +58925,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -59103,7 +59117,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -59116,7 +59130,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -59214,7 +59228,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -59867,7 +59881,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -60488,7 +60502,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61678,7 +61692,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -61838,7 +61852,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63381,7 +63395,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -63984,7 +63998,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65240,9 +65254,8 @@ lookupSelectorinClass(sqInt selector, sqInt class) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; - sqInt fieldIndex; sqInt hash; - usqInt index; + sqInt index; usqInt length; usqInt mask; sqInt meth; @@ -65295,7 +65308,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) hash)))); wrapAround = 0; while (1) { - nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { meth = null; goto l6; @@ -65313,11 +65326,10 @@ lookupSelectorinClass(sqInt selector, sqInt class) } methodArray = objOop2; /* begin followField:ofObject: */ - fieldIndex = index - SelectorStart; - objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); if (((objOop11 & (tagMask())) == 0) && (((longAt(objOop11)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop11 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop11); + objOop11 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop11); } meth = objOop11; goto l6; @@ -65446,10 +65458,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -65886,7 +65898,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -66222,7 +66234,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -66451,7 +66463,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -67570,7 +67582,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68812,7 +68824,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -69289,7 +69301,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -69316,11 +69328,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -69697,7 +69709,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -70239,6 +70251,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -70252,13 +70265,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70654,7 +70672,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70758,7 +70776,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70812,8 +70830,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70823,7 +70841,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70846,8 +70864,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -71301,7 +71319,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -71320,16 +71338,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -71343,25 +71361,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -71369,7 +71387,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -71512,10 +71530,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -71593,7 +71611,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -71753,7 +71771,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -72644,11 +72662,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72793,11 +72811,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72919,8 +72937,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -73354,7 +73372,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -73788,7 +73806,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73798,7 +73816,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73857,7 +73875,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -74232,12 +74250,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -74473,7 +74491,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -74482,7 +74500,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -74522,7 +74540,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -74622,11 +74640,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74704,7 +74722,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -75371,7 +75389,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -75386,7 +75404,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -75413,9 +75431,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -75424,9 +75442,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -75435,7 +75453,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -75447,7 +75465,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -75536,7 +75554,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -75570,7 +75588,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75639,7 +75657,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75647,7 +75665,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75666,7 +75684,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75674,7 +75692,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75685,12 +75703,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75702,7 +75720,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75820,7 +75838,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -76006,17 +76024,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76025,7 +76043,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -76052,80 +76070,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -76135,7 +76153,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76145,15 +76163,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76275,17 +76293,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76309,15 +76327,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -76361,22 +76379,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -76388,43 +76406,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -76432,37 +76450,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -76471,7 +76489,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76480,14 +76498,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -76522,15 +76540,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -76540,13 +76558,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -76598,7 +76616,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -76609,13 +76627,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -76624,7 +76642,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76635,7 +76653,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76644,7 +76662,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76652,7 +76670,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76661,7 +76679,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76669,7 +76687,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76692,7 +76710,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/nsspursrc/vm/vmCallback.h b/nsspursrc/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/nsspursrc/vm/vmCallback.h +++ b/nsspursrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/nsspurstack64src/vm/gcc3x-interp.c b/nsspurstack64src/vm/gcc3x-interp.c index bdff03abb1..82a7b66013 100644 --- a/nsspurstack64src/vm/gcc3x-interp.c +++ b/nsspurstack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -392,9 +392,9 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -621,7 +621,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1171,7 +1171,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1234,7 +1233,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1285,7 +1284,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1342,8 +1341,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1574,15 +1573,15 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1624,7 +1623,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2213,7 +2212,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-nice.1989"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2319,7 +2318,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; JUMP_TABLE; @@ -4271,7 +4270,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5208,7 +5207,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5274,7 +5273,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5340,7 +5339,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5406,7 +5405,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5560,7 +5559,7 @@ interpret(void) l492: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5586,7 +5585,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l491; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l491: /* end internalQuickPrimitiveResponse */; goto l488; } @@ -5680,7 +5679,7 @@ interpret(void) goto l489; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l489: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5809,7 +5808,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5883,7 +5882,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6016,7 +6015,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6439,10 +6438,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6752,7 +6751,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6777,7 +6776,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6814,7 +6813,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -6893,7 +6892,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6918,7 +6917,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6955,7 +6954,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7055,7 +7054,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7092,7 +7091,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7236,7 +7235,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7273,7 +7272,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7407,7 +7406,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7444,7 +7443,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7539,7 +7538,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7576,7 +7575,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7668,7 +7667,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7705,7 +7704,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7797,7 +7796,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7834,7 +7833,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7919,7 +7918,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7946,7 +7945,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7983,7 +7982,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8068,7 +8067,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8094,7 +8093,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8131,7 +8130,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8199,7 +8198,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8300,7 +8299,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8336,7 +8335,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8502,7 +8501,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -8567,7 +8566,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -8628,7 +8627,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l161; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8638,7 +8637,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l161; } @@ -8665,7 +8664,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l161; } } @@ -8777,7 +8776,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -8842,7 +8841,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -9057,7 +9056,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9083,7 +9082,7 @@ interpret(void) } sz = 0; l195: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9107,7 +9106,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9133,7 +9132,7 @@ interpret(void) } sz = 0; l194: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9682,7 +9681,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9707,7 +9706,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9744,7 +9743,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9823,7 +9822,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9848,7 +9847,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9885,7 +9884,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9985,7 +9984,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10022,7 +10021,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10165,7 +10164,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10202,7 +10201,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10336,7 +10335,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10373,7 +10372,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10468,7 +10467,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10505,7 +10504,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10597,7 +10596,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10634,7 +10633,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10726,7 +10725,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10763,7 +10762,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10848,7 +10847,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10875,7 +10874,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10912,7 +10911,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10997,7 +10996,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11023,7 +11022,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11060,7 +11059,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11128,7 +11127,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11229,7 +11228,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11265,7 +11264,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11431,7 +11430,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -11496,7 +11495,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -11557,7 +11556,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l312; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -11567,7 +11566,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l312; } @@ -11594,7 +11593,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l312; } } @@ -11706,7 +11705,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -11771,7 +11770,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -11986,7 +11985,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -12012,7 +12011,7 @@ interpret(void) } sz = 0; l346: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12036,7 +12035,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -12062,7 +12061,7 @@ interpret(void) } sz = 0; l345: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12335,7 +12334,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12585,7 +12584,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l379; } if (index == InstructionPointerIndex) { @@ -12662,7 +12661,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } BREAK; CASE(486) /*230*/ @@ -12873,7 +12872,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12940,7 +12939,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13106,7 +13105,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13174,7 +13173,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13401,7 +13400,7 @@ interpret(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -13540,7 +13539,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13566,7 +13565,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l517; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l517: /* end internalQuickPrimitiveResponse */; goto l522; } @@ -13660,7 +13659,7 @@ interpret(void) goto l509; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l509: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13836,7 +13835,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13862,7 +13861,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l528; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l528: /* end internalQuickPrimitiveResponse */; goto l525; } @@ -13956,7 +13955,7 @@ interpret(void) goto l531; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l531: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14201,7 +14200,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14227,7 +14226,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l425; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l425: /* end internalQuickPrimitiveResponse */; goto l426; } @@ -14321,7 +14320,7 @@ interpret(void) goto l428; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l428: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14445,10 +14444,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -14588,7 +14587,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14614,7 +14613,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l451; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l451: /* end internalQuickPrimitiveResponse */; goto l452; } @@ -14708,7 +14707,7 @@ interpret(void) goto l454; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l454: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -15060,7 +15059,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -15178,7 +15177,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -15284,22 +15283,22 @@ magnitude64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -15387,7 +15386,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -15432,14 +15431,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -15460,7 +15459,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15849,7 +15848,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -15929,11 +15928,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15943,7 +15942,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -15982,7 +15981,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -16017,7 +16016,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -16508,7 +16507,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -16550,10 +16549,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16561,7 +16560,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16576,28 +16575,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16610,10 +16609,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16621,7 +16620,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16636,28 +16635,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16728,10 +16727,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16739,7 +16738,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16754,28 +16753,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16788,10 +16787,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16799,7 +16798,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16814,28 +16813,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16929,7 +16928,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -17056,10 +17055,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -17067,7 +17066,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -17082,28 +17081,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -17115,10 +17114,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -17126,7 +17125,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -17141,28 +17140,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -17246,7 +17245,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -17560,14 +17559,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -17599,7 +17598,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17618,7 +17617,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17912,7 +17911,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -18081,7 +18080,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -18113,7 +18112,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -18227,7 +18226,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -18304,7 +18303,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -18357,7 +18356,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -18393,7 +18392,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -18517,7 +18516,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18580,7 +18579,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18915,7 +18914,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -19015,7 +19014,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19052,7 +19051,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19111,7 +19110,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -19125,7 +19124,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -19247,7 +19246,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19284,7 +19283,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19360,7 +19359,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19398,7 +19397,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19469,7 +19468,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19507,7 +19506,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19578,7 +19577,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19616,7 +19615,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19687,7 +19686,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19725,7 +19724,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19796,7 +19795,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19834,7 +19833,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19906,7 +19905,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19943,7 +19942,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20011,7 +20010,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -20049,7 +20048,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20121,7 +20120,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -20158,7 +20157,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20271,7 +20270,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -20311,7 +20310,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -20353,7 +20352,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -20476,7 +20475,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -20665,10 +20664,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20686,7 +20685,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20725,7 +20724,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20743,7 +20742,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -20876,10 +20875,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -21001,7 +21000,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -21023,7 +21022,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21121,7 +21120,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -21143,7 +21142,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21329,7 +21328,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -21385,7 +21384,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21424,7 +21423,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -21432,7 +21431,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -21458,6 +21457,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -21477,7 +21477,27 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l3; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -21503,7 +21523,7 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21568,7 +21588,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21690,7 +21710,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21782,7 +21802,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21884,7 +21904,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -21914,7 +21934,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -22368,7 +22388,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -22397,7 +22417,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -22413,7 +22433,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -22430,7 +22450,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -22511,7 +22531,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -22599,10 +22619,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22670,7 +22690,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -23006,7 +23026,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -23060,7 +23080,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -23068,7 +23088,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -23142,7 +23162,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -23184,7 +23204,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -23215,7 +23235,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23271,7 +23291,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -23572,7 +23592,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(stack + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; @@ -23610,7 +23630,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots12 = byteAt(current + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (fmt2 <= 5) { index = numSlots3; @@ -23716,7 +23736,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23737,7 +23757,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(next + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { index = numSlots; @@ -23880,7 +23900,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23950,7 +23970,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24042,7 +24062,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24109,7 +24129,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -24169,7 +24189,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24261,7 +24281,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24485,7 +24505,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -24820,7 +24840,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24832,7 +24852,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24881,7 +24901,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24893,7 +24913,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24920,7 +24940,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24932,7 +24952,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24967,7 +24987,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -25063,10 +25083,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25085,7 +25105,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -25342,7 +25362,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25475,7 +25495,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -25517,7 +25537,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25631,7 +25651,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25686,7 +25706,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25880,7 +25900,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25921,7 +25941,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -26011,7 +26031,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -26084,7 +26104,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26100,7 +26120,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26154,7 +26174,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26192,7 +26212,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26208,7 +26228,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26275,7 +26295,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26291,7 +26311,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26355,7 +26375,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -26381,7 +26401,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26419,7 +26439,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26435,7 +26455,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26498,7 +26518,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26514,7 +26534,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26577,7 +26597,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26593,7 +26613,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26656,7 +26676,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26672,7 +26692,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26731,7 +26751,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26769,7 +26789,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26785,7 +26805,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26846,7 +26866,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26862,7 +26882,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26918,7 +26938,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26969,7 +26989,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26985,7 +27005,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -27087,14 +27107,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27338,7 +27358,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27418,11 +27438,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27432,7 +27452,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27478,7 +27498,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -27515,7 +27535,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27777,7 +27797,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -27828,7 +27848,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -27947,7 +27967,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28367,7 +28387,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28476,7 +28496,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -28516,7 +28536,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -28558,7 +28578,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -28651,7 +28671,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28706,7 +28726,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28793,7 +28813,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -28815,7 +28835,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -28886,25 +28906,15 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -28914,66 +28924,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -29076,20 +29033,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -29135,7 +29092,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29154,14 +29111,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -29170,7 +29127,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -29279,7 +29236,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -29375,7 +29332,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29730,7 +29687,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -29822,7 +29779,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29959,7 +29916,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30042,7 +29999,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -30134,7 +30091,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30373,9 +30330,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -30455,7 +30412,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -30524,7 +30481,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30569,7 +30526,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30702,7 +30659,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30740,7 +30697,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -30801,7 +30758,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31200,7 +31157,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -31257,9 +31214,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -31794,7 +31751,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31966,7 +31923,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -32230,7 +32187,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -32271,7 +32228,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32301,7 +32258,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32703,7 +32660,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -32745,7 +32702,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -32800,7 +32757,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32848,7 +32805,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32912,7 +32869,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -32973,7 +32930,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -33027,7 +32984,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -33082,7 +33039,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -33221,7 +33178,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -33258,7 +33215,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -33311,7 +33268,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -33357,7 +33314,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -33395,7 +33352,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -33483,7 +33440,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -33521,7 +33478,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33561,7 +33518,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33618,7 +33575,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -34504,7 +34461,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -34668,7 +34625,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34728,7 +34685,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34821,7 +34778,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35031,7 +34988,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -35145,7 +35102,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35311,7 +35268,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35694,7 +35651,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36073,7 +36030,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36157,7 +36114,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36193,7 +36150,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36231,7 +36188,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36271,7 +36228,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -36344,7 +36301,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -36483,7 +36440,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36701,7 +36658,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36748,7 +36705,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36797,7 +36754,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -37177,7 +37134,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -37236,7 +37193,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -37309,7 +37266,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -37389,7 +37346,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37773,7 +37730,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37811,7 +37768,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38057,7 +38014,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38105,7 +38062,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38155,7 +38112,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38250,7 +38207,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38295,7 +38252,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38342,7 +38299,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39065,7 +39022,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39095,14 +39052,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -39133,7 +39090,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -39185,7 +39142,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39305,7 +39262,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -39322,7 +39279,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -39630,7 +39587,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39668,7 +39625,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39708,7 +39665,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39818,9 +39775,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -39983,9 +39940,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -41121,7 +41078,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41161,7 +41118,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41291,7 +41248,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -41309,7 +41266,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41331,7 +41288,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41367,7 +41324,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -41437,7 +41394,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -41519,7 +41476,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41545,7 +41502,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -41639,7 +41596,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -41779,7 +41736,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41824,7 +41781,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41862,7 +41819,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41956,9 +41913,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41984,7 +41941,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -42026,9 +41983,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -42054,7 +42011,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42097,9 +42054,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -42126,7 +42083,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -42236,9 +42193,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -42357,7 +42314,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -42573,7 +42530,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -42679,7 +42636,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -42745,7 +42702,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -43295,7 +43252,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43332,7 +43289,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43825,7 +43782,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43892,7 +43849,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -43960,7 +43917,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44003,7 +43960,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44039,7 +43996,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44098,9 +44055,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -44130,7 +44087,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -44144,7 +44101,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -44175,7 +44132,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -44274,7 +44231,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44296,7 +44253,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44319,7 +44276,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44340,7 +44297,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -44418,7 +44375,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44455,7 +44412,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44495,7 +44452,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45052,7 +45009,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45098,7 +45055,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45146,7 +45103,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45248,7 +45205,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45301,7 +45258,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45356,7 +45313,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45429,7 +45386,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45474,7 +45431,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45512,7 +45469,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45603,7 +45560,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45646,7 +45603,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45684,7 +45641,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45860,13 +45817,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -45875,9 +45832,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -46036,7 +45993,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46081,7 +46038,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46119,7 +46076,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46266,7 +46223,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46317,7 +46274,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46370,7 +46327,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46469,7 +46426,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46514,7 +46471,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46552,7 +46509,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46683,7 +46640,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46790,9 +46747,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -46831,7 +46788,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46882,9 +46839,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -46923,7 +46880,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46975,9 +46932,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -47017,7 +46974,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -47714,7 +47671,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -47920,7 +47877,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -48014,7 +47971,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -48068,7 +48025,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48115,7 +48072,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -48152,7 +48109,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -48275,9 +48232,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -48286,9 +48243,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -48325,7 +48282,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -48974,7 +48931,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -48995,7 +48952,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -49410,7 +49367,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49533,7 +49490,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -49593,7 +49550,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -49904,7 +49861,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -49917,7 +49874,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -49976,7 +49933,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -49989,7 +49946,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -50324,7 +50281,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50360,7 +50317,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50398,7 +50355,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50872,7 +50829,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -51261,7 +51218,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -51569,7 +51526,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -51659,7 +51616,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -52083,7 +52040,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -52149,7 +52106,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -52217,7 +52174,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52271,7 +52228,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52311,7 +52268,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52353,7 +52310,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -52469,7 +52426,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -52715,7 +52672,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -52844,7 +52801,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52984,7 +52941,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -53282,7 +53239,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -54391,7 +54348,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -54561,18 +54518,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -54590,7 +54535,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -54879,7 +54824,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -54894,7 +54839,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -55033,7 +54978,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -55126,7 +55071,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -55159,7 +55104,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -55295,7 +55240,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55447,7 +55392,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55618,7 +55563,7 @@ lookupMNU(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55783,7 +55728,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55952,7 +55897,7 @@ lookupOrdinarySend(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -56111,7 +56056,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -56264,7 +56209,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -56558,10 +56503,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -56969,7 +56914,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((((anOop) & 7) == 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -57102,7 +57047,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -57450,7 +57395,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -57645,7 +57590,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -57707,7 +57652,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -57823,7 +57768,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -58037,7 +57982,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -58083,7 +58028,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -58128,7 +58073,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -58166,7 +58111,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58787,7 +58732,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -59098,7 +59043,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -59335,7 +59280,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -59574,7 +59519,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -59607,12 +59552,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -59640,7 +59585,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -59767,7 +59712,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -60124,7 +60069,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -60157,7 +60102,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -60628,7 +60573,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -60655,11 +60600,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -61159,9 +61104,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -61765,7 +61710,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -61980,7 +61925,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62135,7 +62080,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62315,6 +62260,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -62328,9 +62274,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -62553,7 +62504,7 @@ signalExternalSemaphores(void) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } @@ -62576,14 +62527,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -62687,7 +62638,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -62823,7 +62774,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -62898,7 +62849,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62952,8 +62903,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -62965,7 +62916,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -62988,8 +62939,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -63472,7 +63423,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -63491,16 +63442,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -63514,25 +63465,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -63540,7 +63491,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -63601,7 +63552,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -63679,10 +63630,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -63690,7 +63641,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -63721,14 +63672,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -63881,7 +63832,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -63996,7 +63947,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64083,7 +64034,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -64425,7 +64376,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -64599,7 +64550,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -64643,7 +64594,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -64689,7 +64640,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -64752,9 +64703,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -64969,7 +64920,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -65196,7 +65147,7 @@ primitiveClosureCopyWithCopiedValues(void) assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(copiedValues + 7); numCopied = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); @@ -65236,10 +65187,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -65310,7 +65261,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -65390,11 +65341,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -65404,7 +65355,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -65440,7 +65391,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -65499,11 +65450,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -65513,7 +65464,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -65579,8 +65530,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -65601,7 +65552,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -65768,7 +65719,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -65932,7 +65883,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -66007,7 +65958,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -66043,7 +65994,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -66142,7 +66093,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -66203,7 +66154,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -66246,7 +66197,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -66408,7 +66359,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -66462,7 +66413,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -66472,7 +66423,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -66511,7 +66462,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -66587,7 +66538,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -66679,7 +66630,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -66790,7 +66741,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -66882,7 +66833,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67019,7 +66970,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -67056,7 +67007,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -67101,12 +67052,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -67380,7 +67331,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -67389,7 +67340,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -67429,7 +67380,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -67469,7 +67420,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -67525,11 +67476,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -67539,7 +67490,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -67566,7 +67517,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -67598,7 +67549,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -67889,7 +67840,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -67993,7 +67944,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -68085,7 +68036,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -68371,9 +68322,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -68388,7 +68339,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -68415,9 +68366,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -68426,9 +68377,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -68437,7 +68388,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -68449,10 +68400,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -68498,7 +68449,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -68530,9 +68481,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -68601,7 +68552,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -68609,7 +68560,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -68628,7 +68579,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -68636,7 +68587,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68647,12 +68598,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68664,7 +68615,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68675,12 +68626,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68797,7 +68748,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -69295,17 +69246,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69314,7 +69265,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -69341,80 +69292,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45ULL << (shiftForWord())), GIV(nilObj)); @@ -69422,7 +69373,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -69430,15 +69381,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69561,13 +69512,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 3) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69591,15 +69542,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -69643,22 +69594,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -69670,43 +69621,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -69714,37 +69665,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -69753,21 +69704,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -69805,12 +69756,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -69820,13 +69771,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -69879,7 +69830,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -69890,13 +69841,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -69905,7 +69856,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -69916,7 +69867,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69925,7 +69876,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69933,7 +69884,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69941,7 +69892,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -69961,7 +69912,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -70192,7 +70143,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -70246,7 +70197,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -70293,7 +70244,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/nsspurstack64src/vm/interp.c b/nsspurstack64src/vm/interp.c index 158c602e1d..975a1bbef6 100644 --- a/nsspurstack64src/vm/interp.c +++ b/nsspurstack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -389,9 +389,9 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -618,7 +618,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1168,7 +1168,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1231,7 +1230,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1282,7 +1281,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1339,8 +1338,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1571,15 +1570,15 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1621,7 +1620,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2210,7 +2209,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-nice.1989"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2316,7 +2315,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4262,7 +4261,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5199,7 +5198,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5265,7 +5264,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5331,7 +5330,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5397,7 +5396,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5551,7 +5550,7 @@ interpret(void) l492: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5577,7 +5576,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l491; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l491: /* end internalQuickPrimitiveResponse */; goto l488; } @@ -5671,7 +5670,7 @@ interpret(void) goto l489; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l489: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5800,7 +5799,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5874,7 +5873,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6007,7 +6006,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6430,10 +6429,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6743,7 +6742,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6768,7 +6767,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6805,7 +6804,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -6884,7 +6883,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6909,7 +6908,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6946,7 +6945,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7046,7 +7045,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7083,7 +7082,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7227,7 +7226,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7264,7 +7263,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7398,7 +7397,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7435,7 +7434,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7530,7 +7529,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7567,7 +7566,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7659,7 +7658,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7696,7 +7695,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7788,7 +7787,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7825,7 +7824,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7910,7 +7909,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7937,7 +7936,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7974,7 +7973,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8059,7 +8058,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8085,7 +8084,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8122,7 +8121,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8190,7 +8189,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8291,7 +8290,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8327,7 +8326,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8493,7 +8492,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -8558,7 +8557,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -8619,7 +8618,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l161; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8629,7 +8628,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l161; } @@ -8656,7 +8655,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l161; } } @@ -8768,7 +8767,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -8833,7 +8832,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -9048,7 +9047,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9074,7 +9073,7 @@ interpret(void) } sz = 0; l195: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9098,7 +9097,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9124,7 +9123,7 @@ interpret(void) } sz = 0; l194: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9673,7 +9672,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9698,7 +9697,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9735,7 +9734,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9814,7 +9813,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9839,7 +9838,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9876,7 +9875,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9976,7 +9975,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10013,7 +10012,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10156,7 +10155,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10193,7 +10192,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10327,7 +10326,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10364,7 +10363,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10459,7 +10458,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10496,7 +10495,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10588,7 +10587,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10625,7 +10624,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10717,7 +10716,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10754,7 +10753,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10839,7 +10838,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10866,7 +10865,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10903,7 +10902,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10988,7 +10987,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11014,7 +11013,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11051,7 +11050,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11119,7 +11118,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11220,7 +11219,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11256,7 +11255,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11422,7 +11421,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -11487,7 +11486,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -11548,7 +11547,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l312; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -11558,7 +11557,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l312; } @@ -11585,7 +11584,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l312; } } @@ -11697,7 +11696,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -11762,7 +11761,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -11977,7 +11976,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -12003,7 +12002,7 @@ interpret(void) } sz = 0; l346: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12027,7 +12026,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -12053,7 +12052,7 @@ interpret(void) } sz = 0; l345: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12326,7 +12325,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12576,7 +12575,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l379; } if (index == InstructionPointerIndex) { @@ -12653,7 +12652,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } break; case 486: /*230*/ @@ -12864,7 +12863,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12931,7 +12930,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13097,7 +13096,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13165,7 +13164,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13392,7 +13391,7 @@ interpret(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -13531,7 +13530,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13557,7 +13556,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l517; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l517: /* end internalQuickPrimitiveResponse */; goto l522; } @@ -13651,7 +13650,7 @@ interpret(void) goto l509; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l509: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13827,7 +13826,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13853,7 +13852,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l528; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l528: /* end internalQuickPrimitiveResponse */; goto l525; } @@ -13947,7 +13946,7 @@ interpret(void) goto l531; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l531: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14192,7 +14191,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14218,7 +14217,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l425; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l425: /* end internalQuickPrimitiveResponse */; goto l426; } @@ -14312,7 +14311,7 @@ interpret(void) goto l428; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l428: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14436,10 +14435,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -14579,7 +14578,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -14605,7 +14604,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l451; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l451: /* end internalQuickPrimitiveResponse */; goto l452; } @@ -14699,7 +14698,7 @@ interpret(void) goto l454; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l454: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -15051,7 +15050,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -15169,7 +15168,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -15275,22 +15274,22 @@ magnitude64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -15378,7 +15377,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -15423,14 +15422,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -15451,7 +15450,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15840,7 +15839,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -15920,11 +15919,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15934,7 +15933,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -15973,7 +15972,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -16008,7 +16007,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -16499,7 +16498,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -16541,10 +16540,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16552,7 +16551,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16567,28 +16566,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16601,10 +16600,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16612,7 +16611,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16627,28 +16626,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16719,10 +16718,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16730,7 +16729,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16745,28 +16744,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16779,10 +16778,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16790,7 +16789,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16805,28 +16804,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16920,7 +16919,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -17047,10 +17046,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -17058,7 +17057,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -17073,28 +17072,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -17106,10 +17105,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -17117,7 +17116,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -17132,28 +17131,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -17237,7 +17236,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -17551,14 +17550,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -17590,7 +17589,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17609,7 +17608,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17903,7 +17902,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -18072,7 +18071,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -18104,7 +18103,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -18218,7 +18217,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -18295,7 +18294,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -18348,7 +18347,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -18384,7 +18383,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -18508,7 +18507,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18571,7 +18570,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18906,7 +18905,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -19006,7 +19005,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19043,7 +19042,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19102,7 +19101,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -19116,7 +19115,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -19238,7 +19237,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19275,7 +19274,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19351,7 +19350,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19389,7 +19388,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19460,7 +19459,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19498,7 +19497,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19569,7 +19568,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19607,7 +19606,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19678,7 +19677,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19716,7 +19715,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19787,7 +19786,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19825,7 +19824,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19897,7 +19896,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19934,7 +19933,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20002,7 +20001,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -20040,7 +20039,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20112,7 +20111,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -20149,7 +20148,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -20262,7 +20261,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -20302,7 +20301,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -20344,7 +20343,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -20467,7 +20466,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -20656,10 +20655,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20677,7 +20676,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20716,7 +20715,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20734,7 +20733,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -20867,10 +20866,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20992,7 +20991,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -21014,7 +21013,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21112,7 +21111,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -21134,7 +21133,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21320,7 +21319,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -21376,7 +21375,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21415,7 +21414,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -21423,7 +21422,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -21449,6 +21448,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -21468,7 +21468,27 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l3; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -21494,7 +21514,7 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21559,7 +21579,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21681,7 +21701,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21773,7 +21793,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21875,7 +21895,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -21905,7 +21925,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -22359,7 +22379,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -22388,7 +22408,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -22404,7 +22424,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -22421,7 +22441,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -22502,7 +22522,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -22590,10 +22610,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22661,7 +22681,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -22997,7 +23017,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -23051,7 +23071,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -23059,7 +23079,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -23133,7 +23153,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -23175,7 +23195,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -23206,7 +23226,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23262,7 +23282,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -23563,7 +23583,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(stack + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; @@ -23601,7 +23621,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots12 = byteAt(current + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (fmt2 <= 5) { index = numSlots3; @@ -23707,7 +23727,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23728,7 +23748,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(next + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { index = numSlots; @@ -23871,7 +23891,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23941,7 +23961,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24033,7 +24053,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24100,7 +24120,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -24160,7 +24180,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24252,7 +24272,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24476,7 +24496,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -24811,7 +24831,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24823,7 +24843,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24872,7 +24892,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24884,7 +24904,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24911,7 +24931,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24923,7 +24943,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24958,7 +24978,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -25054,10 +25074,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25076,7 +25096,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -25333,7 +25353,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25466,7 +25486,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -25508,7 +25528,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25622,7 +25642,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25677,7 +25697,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25871,7 +25891,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25912,7 +25932,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -26002,7 +26022,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -26075,7 +26095,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26091,7 +26111,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26145,7 +26165,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26183,7 +26203,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26199,7 +26219,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26266,7 +26286,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26282,7 +26302,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26346,7 +26366,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -26372,7 +26392,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26410,7 +26430,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26426,7 +26446,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26489,7 +26509,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26505,7 +26525,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26568,7 +26588,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26584,7 +26604,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26647,7 +26667,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26663,7 +26683,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26722,7 +26742,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26760,7 +26780,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26776,7 +26796,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26837,7 +26857,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26853,7 +26873,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26909,7 +26929,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26960,7 +26980,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26976,7 +26996,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -27078,14 +27098,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27329,7 +27349,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27409,11 +27429,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27423,7 +27443,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27469,7 +27489,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -27506,7 +27526,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27768,7 +27788,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -27819,7 +27839,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -27938,7 +27958,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28358,7 +28378,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28467,7 +28487,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -28507,7 +28527,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -28549,7 +28569,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -28642,7 +28662,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28697,7 +28717,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28784,7 +28804,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -28806,7 +28826,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -28877,25 +28897,15 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -28905,66 +28915,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -29067,20 +29024,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -29126,7 +29083,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29145,14 +29102,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -29161,7 +29118,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -29270,7 +29227,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -29366,7 +29323,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29721,7 +29678,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -29813,7 +29770,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29950,7 +29907,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30033,7 +29990,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -30125,7 +30082,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30364,9 +30321,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -30446,7 +30403,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -30515,7 +30472,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30560,7 +30517,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30693,7 +30650,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30731,7 +30688,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -30792,7 +30749,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31191,7 +31148,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -31248,9 +31205,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -31785,7 +31742,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31957,7 +31914,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -32221,7 +32178,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -32262,7 +32219,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32292,7 +32249,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32694,7 +32651,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -32736,7 +32693,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -32791,7 +32748,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32839,7 +32796,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32903,7 +32860,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -32964,7 +32921,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -33018,7 +32975,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -33073,7 +33030,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -33212,7 +33169,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -33249,7 +33206,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -33302,7 +33259,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -33348,7 +33305,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -33386,7 +33343,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -33474,7 +33431,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -33512,7 +33469,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33552,7 +33509,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33609,7 +33566,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -34495,7 +34452,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -34659,7 +34616,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34719,7 +34676,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34812,7 +34769,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35022,7 +34979,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -35136,7 +35093,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35302,7 +35259,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35685,7 +35642,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36064,7 +36021,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36148,7 +36105,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36184,7 +36141,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36222,7 +36179,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36262,7 +36219,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -36335,7 +36292,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -36474,7 +36431,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36692,7 +36649,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36739,7 +36696,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36788,7 +36745,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -37168,7 +37125,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -37227,7 +37184,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -37300,7 +37257,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -37380,7 +37337,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37764,7 +37721,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37802,7 +37759,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38048,7 +38005,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38096,7 +38053,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38146,7 +38103,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38241,7 +38198,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38286,7 +38243,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38333,7 +38290,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39056,7 +39013,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39086,14 +39043,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -39124,7 +39081,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -39176,7 +39133,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39296,7 +39253,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -39313,7 +39270,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -39621,7 +39578,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39659,7 +39616,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39699,7 +39656,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39809,9 +39766,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -39974,9 +39931,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -41112,7 +41069,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41152,7 +41109,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41282,7 +41239,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -41300,7 +41257,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41322,7 +41279,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41358,7 +41315,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -41428,7 +41385,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -41510,7 +41467,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41536,7 +41493,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -41630,7 +41587,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -41770,7 +41727,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41815,7 +41772,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41853,7 +41810,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41947,9 +41904,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41975,7 +41932,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -42017,9 +41974,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -42045,7 +42002,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42088,9 +42045,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -42117,7 +42074,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -42227,9 +42184,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -42348,7 +42305,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -42564,7 +42521,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -42670,7 +42627,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -42736,7 +42693,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -43286,7 +43243,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43323,7 +43280,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43816,7 +43773,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43883,7 +43840,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -43951,7 +43908,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -43994,7 +43951,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44030,7 +43987,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44089,9 +44046,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -44121,7 +44078,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -44135,7 +44092,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -44166,7 +44123,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -44265,7 +44222,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44287,7 +44244,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44310,7 +44267,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44331,7 +44288,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -44409,7 +44366,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44446,7 +44403,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44486,7 +44443,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45043,7 +45000,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45089,7 +45046,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45137,7 +45094,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45239,7 +45196,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45292,7 +45249,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45347,7 +45304,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45420,7 +45377,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45465,7 +45422,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45503,7 +45460,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45594,7 +45551,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45637,7 +45594,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45675,7 +45632,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45851,13 +45808,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -45866,9 +45823,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -46027,7 +45984,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46072,7 +46029,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46110,7 +46067,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46257,7 +46214,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46308,7 +46265,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46361,7 +46318,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46460,7 +46417,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46505,7 +46462,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46543,7 +46500,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46674,7 +46631,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46781,9 +46738,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -46822,7 +46779,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46873,9 +46830,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -46914,7 +46871,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46966,9 +46923,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -47008,7 +46965,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -47705,7 +47662,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -47911,7 +47868,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -48005,7 +47962,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -48059,7 +48016,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48106,7 +48063,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -48143,7 +48100,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -48266,9 +48223,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -48277,9 +48234,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -48316,7 +48273,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -48965,7 +48922,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -48986,7 +48943,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -49401,7 +49358,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49524,7 +49481,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -49584,7 +49541,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -49895,7 +49852,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -49908,7 +49865,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -49967,7 +49924,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -49980,7 +49937,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -50315,7 +50272,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50351,7 +50308,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50389,7 +50346,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50863,7 +50820,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -51252,7 +51209,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -51560,7 +51517,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -51650,7 +51607,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -52074,7 +52031,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -52140,7 +52097,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -52208,7 +52165,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52262,7 +52219,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52302,7 +52259,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52344,7 +52301,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -52460,7 +52417,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -52706,7 +52663,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -52835,7 +52792,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52975,7 +52932,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -53273,7 +53230,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -54382,7 +54339,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -54552,18 +54509,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -54581,7 +54526,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -54870,7 +54815,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -54885,7 +54830,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -55024,7 +54969,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -55117,7 +55062,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -55150,7 +55095,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -55286,7 +55231,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55438,7 +55383,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55609,7 +55554,7 @@ lookupMNU(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55774,7 +55719,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55943,7 +55888,7 @@ lookupOrdinarySend(void) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -56102,7 +56047,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -56255,7 +56200,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -56549,10 +56494,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -56960,7 +56905,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((((anOop) & 7) == 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -57093,7 +57038,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -57441,7 +57386,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -57636,7 +57581,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -57698,7 +57643,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -57814,7 +57759,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -58028,7 +57973,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -58074,7 +58019,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -58119,7 +58064,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -58157,7 +58102,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58778,7 +58723,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -59089,7 +59034,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -59326,7 +59271,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -59565,7 +59510,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -59598,12 +59543,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -59631,7 +59576,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -59758,7 +59703,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -60115,7 +60060,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -60148,7 +60093,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -60619,7 +60564,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -60646,11 +60591,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -61150,9 +61095,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -61756,7 +61701,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -61971,7 +61916,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62126,7 +62071,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62306,6 +62251,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -62319,9 +62265,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -62544,7 +62495,7 @@ signalExternalSemaphores(void) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } @@ -62567,14 +62518,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -62678,7 +62629,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -62814,7 +62765,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -62889,7 +62840,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -62943,8 +62894,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -62956,7 +62907,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -62979,8 +62930,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -63463,7 +63414,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -63482,16 +63433,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -63505,25 +63456,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -63531,7 +63482,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -63592,7 +63543,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -63670,10 +63621,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -63681,7 +63632,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -63712,14 +63663,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -63872,7 +63823,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -63987,7 +63938,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64074,7 +64025,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -64416,7 +64367,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -64590,7 +64541,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -64634,7 +64585,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -64680,7 +64631,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -64743,9 +64694,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -64960,7 +64911,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -65187,7 +65138,7 @@ primitiveClosureCopyWithCopiedValues(void) assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(copiedValues + 7); numCopied = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); @@ -65227,10 +65178,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -65301,7 +65252,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -65381,11 +65332,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -65395,7 +65346,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -65431,7 +65382,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -65490,11 +65441,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -65504,7 +65455,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -65570,8 +65521,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -65592,7 +65543,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -65759,7 +65710,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -65923,7 +65874,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -65998,7 +65949,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -66034,7 +65985,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -66133,7 +66084,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -66194,7 +66145,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -66237,7 +66188,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -66399,7 +66350,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -66453,7 +66404,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -66463,7 +66414,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -66502,7 +66453,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -66578,7 +66529,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -66670,7 +66621,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -66781,7 +66732,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -66873,7 +66824,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67010,7 +66961,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -67047,7 +66998,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -67092,12 +67043,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -67371,7 +67322,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -67380,7 +67331,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -67420,7 +67371,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -67460,7 +67411,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -67516,11 +67467,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -67530,7 +67481,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -67557,7 +67508,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -67589,7 +67540,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -67880,7 +67831,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -67984,7 +67935,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -68076,7 +68027,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -68362,9 +68313,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -68379,7 +68330,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -68406,9 +68357,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -68417,9 +68368,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -68428,7 +68379,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -68440,10 +68391,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -68489,7 +68440,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -68521,9 +68472,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -68592,7 +68543,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -68600,7 +68551,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -68619,7 +68570,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -68627,7 +68578,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68638,12 +68589,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68655,7 +68606,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68666,12 +68617,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -68788,7 +68739,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -69286,17 +69237,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69305,7 +69256,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -69332,80 +69283,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45ULL << (shiftForWord())), GIV(nilObj)); @@ -69413,7 +69364,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -69421,15 +69372,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69552,13 +69503,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 3) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -69582,15 +69533,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -69634,22 +69585,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -69661,43 +69612,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -69705,37 +69656,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -69744,21 +69695,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -69796,12 +69747,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -69811,13 +69762,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -69870,7 +69821,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -69881,13 +69832,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -69896,7 +69847,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -69907,7 +69858,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69916,7 +69867,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69924,7 +69875,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -69932,7 +69883,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -69952,7 +69903,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -70183,7 +70134,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -70237,7 +70188,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -70284,7 +70235,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/nsspurstack64src/vm/vmCallback.h b/nsspurstack64src/vm/vmCallback.h index 772c6c9fb5..6c4fdfda5e 100644 --- a/nsspurstack64src/vm/vmCallback.h +++ b/nsspurstack64src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/nsspurstacksrc/vm/gcc3x-interp.c b/nsspurstacksrc/vm/gcc3x-interp.c index c43de71bbe..cb8ec088b1 100644 --- a/nsspurstacksrc/vm/gcc3x-interp.c +++ b/nsspurstacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -391,9 +391,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -601,7 +602,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1147,7 +1148,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1211,7 +1211,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1262,7 +1262,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1319,8 +1319,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1551,15 +1551,15 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1601,7 +1601,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2190,7 +2190,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-nice.1989"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2292,7 +2292,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; JUMP_TABLE; @@ -4244,7 +4244,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5181,7 +5181,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5247,7 +5247,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5313,7 +5313,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5379,7 +5379,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5535,7 +5535,7 @@ interpret(void) l502: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5561,7 +5561,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l501; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l501: /* end internalQuickPrimitiveResponse */; goto l498; } @@ -5655,7 +5655,7 @@ interpret(void) goto l499; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l499: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5784,7 +5784,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5858,7 +5858,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5991,7 +5991,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6414,10 +6414,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6718,7 +6718,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6816,7 +6816,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7541,7 +7541,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7647,7 +7647,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7744,7 +7744,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7852,7 +7852,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l150; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -7928,7 +7928,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8224,7 +8224,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l170; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8237,7 +8237,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l170; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8301,7 +8301,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l170; } } @@ -8358,7 +8358,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -8719,7 +8719,7 @@ interpret(void) } sz = 0; l200: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8769,7 +8769,7 @@ interpret(void) } sz = 0; l199: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9315,7 +9315,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9413,7 +9413,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10137,7 +10137,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10243,7 +10243,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10340,7 +10340,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10448,7 +10448,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l306; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10524,7 +10524,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10820,7 +10820,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l326; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -10833,7 +10833,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l326; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10897,7 +10897,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l326; } } @@ -10954,7 +10954,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut1); @@ -11315,7 +11315,7 @@ interpret(void) } sz = 0; l356: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11365,7 +11365,7 @@ interpret(void) } sz = 0; l355: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11638,7 +11638,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11888,7 +11888,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l389; } if (index == InstructionPointerIndex) { @@ -11965,7 +11965,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } BREAK; CASE(486) /*230*/ @@ -12176,7 +12176,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12243,7 +12243,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12409,7 +12409,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12477,7 +12477,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12849,7 +12849,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12875,7 +12875,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l527; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l527: /* end internalQuickPrimitiveResponse */; goto l532; } @@ -12969,7 +12969,7 @@ interpret(void) goto l519; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l519: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13147,7 +13147,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13173,7 +13173,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l538; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l538: /* end internalQuickPrimitiveResponse */; goto l535; } @@ -13267,7 +13267,7 @@ interpret(void) goto l541; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l541: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13514,7 +13514,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13540,7 +13540,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l435; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l435: /* end internalQuickPrimitiveResponse */; goto l436; } @@ -13634,7 +13634,7 @@ interpret(void) goto l438; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l438: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13758,10 +13758,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13903,7 +13903,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13929,7 +13929,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l461; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l461: /* end internalQuickPrimitiveResponse */; goto l462; } @@ -14023,7 +14023,7 @@ interpret(void) goto l464; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l464: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14494,7 +14494,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14608,13 +14608,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -14623,10 +14702,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -14670,6 +14749,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -14750,7 +14830,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14795,14 +14875,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14823,7 +14903,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15315,11 +15395,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15408,7 +15488,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15934,7 +16014,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15976,10 +16056,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15987,7 +16067,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16002,28 +16082,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16036,10 +16116,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16047,7 +16127,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16062,28 +16142,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16154,10 +16234,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16165,7 +16245,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16180,28 +16260,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16214,10 +16294,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16225,7 +16305,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16240,28 +16320,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16362,7 +16442,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -16529,10 +16609,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -16540,7 +16620,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16555,28 +16635,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16588,10 +16668,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16599,7 +16679,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16614,28 +16694,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16719,7 +16799,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -17038,7 +17118,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -17159,7 +17239,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17178,7 +17258,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17864,7 +17944,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -18077,7 +18157,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -18140,7 +18220,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -18512,7 +18592,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19991,10 +20071,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20012,7 +20092,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20051,7 +20131,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20069,7 +20149,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -20202,10 +20282,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20325,7 +20405,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20490,7 +20570,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20519,7 +20599,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -20735,7 +20815,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -20830,7 +20910,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20883,7 +20963,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -20974,7 +21058,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21098,7 +21182,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21190,7 +21274,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21292,7 +21376,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21322,7 +21406,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21791,7 +21875,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -21820,7 +21904,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -21836,7 +21920,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -21853,7 +21937,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21934,7 +22018,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -22022,10 +22106,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22093,7 +22177,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -22427,7 +22511,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22481,7 +22565,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22489,7 +22573,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22692,7 +22776,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -23134,7 +23218,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23369,7 +23453,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23461,7 +23545,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23590,7 +23674,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23682,7 +23766,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23906,7 +23990,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24241,7 +24325,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24253,7 +24337,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24302,7 +24386,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24314,7 +24398,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24341,7 +24425,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24353,7 +24437,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24388,7 +24472,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24484,10 +24568,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24943,7 +25027,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -25099,7 +25183,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25154,7 +25238,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25408,7 +25492,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -25498,7 +25582,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25883,11 +25967,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25983,7 +26067,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -26452,7 +26536,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26895,7 +26979,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27179,7 +27263,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27234,7 +27318,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27321,7 +27405,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -27343,7 +27427,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -27414,83 +27498,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -27593,20 +27608,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -27671,14 +27686,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -27687,7 +27702,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -27796,7 +27811,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -28816,9 +28831,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -31521,7 +31536,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -31830,7 +31845,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -37738,7 +37753,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -41083,7 +41098,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -41147,7 +41162,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -45078,7 +45093,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46523,7 +46538,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -47341,7 +47356,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -47362,7 +47377,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -47960,7 +47975,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -48271,7 +48286,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -48284,7 +48299,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -48343,7 +48358,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -48356,7 +48371,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -48445,7 +48460,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -49239,7 +49254,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -49628,7 +49643,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -49936,7 +49951,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -50026,7 +50041,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -50834,7 +50849,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -51080,7 +51095,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -51222,7 +51237,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52784,7 +52799,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -52951,18 +52966,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -52980,7 +52983,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -53549,7 +53552,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -54962,10 +54965,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -55373,7 +55376,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -55506,7 +55509,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -55887,7 +55890,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -56273,7 +56276,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -57402,7 +57405,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -58183,12 +58186,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -58216,7 +58219,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -58720,7 +58723,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -59191,7 +59194,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -59218,11 +59221,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -60328,7 +60331,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -60543,7 +60546,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60698,7 +60701,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60878,6 +60881,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -60891,9 +60895,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -61137,14 +61146,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -61398,7 +61407,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -61473,7 +61482,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61527,8 +61536,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -61540,7 +61549,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -61563,8 +61572,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -62063,7 +62072,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -62082,16 +62091,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -62105,25 +62114,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -62131,7 +62140,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -62274,10 +62283,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -62355,7 +62364,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -62515,7 +62524,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -62717,7 +62726,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -63059,7 +63068,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -63865,10 +63874,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -64027,11 +64036,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -64176,11 +64185,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -64297,8 +64306,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -64725,7 +64734,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -64761,7 +64770,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -65180,7 +65189,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -65190,7 +65199,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -65229,7 +65238,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -65305,7 +65314,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -65397,7 +65406,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65508,7 +65517,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -65600,7 +65609,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65819,12 +65828,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -66098,7 +66107,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -66107,7 +66116,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -66147,7 +66156,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -66247,11 +66256,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -66329,7 +66338,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -66758,7 +66767,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -66850,7 +66859,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67143,7 +67152,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -67158,7 +67167,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -67185,9 +67194,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -67196,9 +67205,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -67207,7 +67216,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -67219,7 +67228,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -67307,7 +67316,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -67341,7 +67350,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -67410,7 +67419,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -67418,7 +67427,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -67437,7 +67446,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -67445,7 +67454,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67456,12 +67465,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67473,7 +67482,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67590,7 +67599,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -68089,17 +68098,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68108,7 +68117,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -68135,80 +68144,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); @@ -68216,7 +68225,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68224,15 +68233,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68355,13 +68364,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 1) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68385,15 +68394,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -68437,22 +68446,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -68464,43 +68473,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -68508,37 +68517,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -68547,21 +68556,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -68599,12 +68608,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -68614,13 +68623,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -68672,7 +68681,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -68683,13 +68692,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -68698,7 +68707,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -68709,7 +68718,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68718,7 +68727,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68726,7 +68735,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68734,7 +68743,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68754,7 +68763,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/nsspurstacksrc/vm/interp.c b/nsspurstacksrc/vm/interp.c index 753ddc443a..4f77ee64c3 100644 --- a/nsspurstacksrc/vm/interp.c +++ b/nsspurstacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -388,9 +388,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -598,7 +599,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1144,7 +1145,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1208,7 +1208,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1259,7 +1259,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1316,8 +1316,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1548,15 +1548,15 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 2049 */]; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; @@ -1598,7 +1598,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2187,7 +2187,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1976"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-nice.1989"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2289,7 +2289,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4235,7 +4235,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5172,7 +5172,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5238,7 +5238,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5304,7 +5304,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5370,7 +5370,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5526,7 +5526,7 @@ interpret(void) l502: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5552,7 +5552,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l501; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l501: /* end internalQuickPrimitiveResponse */; goto l498; } @@ -5646,7 +5646,7 @@ interpret(void) goto l499; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l499: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5775,7 +5775,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5849,7 +5849,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5982,7 +5982,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6405,10 +6405,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6709,7 +6709,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6807,7 +6807,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7532,7 +7532,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7638,7 +7638,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7735,7 +7735,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7843,7 +7843,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l150; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -7919,7 +7919,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8215,7 +8215,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l170; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8228,7 +8228,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l170; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8292,7 +8292,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l170; } } @@ -8349,7 +8349,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -8710,7 +8710,7 @@ interpret(void) } sz = 0; l200: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8760,7 +8760,7 @@ interpret(void) } sz = 0; l199: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9306,7 +9306,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9404,7 +9404,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10128,7 +10128,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10234,7 +10234,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10331,7 +10331,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10439,7 +10439,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l306; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10515,7 +10515,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10811,7 +10811,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l326; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -10824,7 +10824,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l326; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10888,7 +10888,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l326; } } @@ -10945,7 +10945,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut1); @@ -11306,7 +11306,7 @@ interpret(void) } sz = 0; l356: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11356,7 +11356,7 @@ interpret(void) } sz = 0; l355: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11629,7 +11629,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11879,7 +11879,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l389; } if (index == InstructionPointerIndex) { @@ -11956,7 +11956,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } break; case 486: /*230*/ @@ -12167,7 +12167,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12234,7 +12234,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12400,7 +12400,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12468,7 +12468,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12840,7 +12840,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -12866,7 +12866,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l527; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l527: /* end internalQuickPrimitiveResponse */; goto l532; } @@ -12960,7 +12960,7 @@ interpret(void) goto l519; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l519: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13138,7 +13138,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13164,7 +13164,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l538; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l538: /* end internalQuickPrimitiveResponse */; goto l535; } @@ -13258,7 +13258,7 @@ interpret(void) goto l541; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l541: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13505,7 +13505,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13531,7 +13531,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l435; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l435: /* end internalQuickPrimitiveResponse */; goto l436; } @@ -13625,7 +13625,7 @@ interpret(void) goto l438; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l438: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -13749,10 +13749,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13894,7 +13894,7 @@ interpret(void) longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), GIV(localAbsentReceiver)); /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -13920,7 +13920,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l461; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l461: /* end internalQuickPrimitiveResponse */; goto l462; } @@ -14014,7 +14014,7 @@ interpret(void) goto l464; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l464: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -14485,7 +14485,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14599,13 +14599,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -14614,10 +14693,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -14661,6 +14740,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -14741,7 +14821,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14786,14 +14866,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14814,7 +14894,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15306,11 +15386,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15399,7 +15479,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15925,7 +16005,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15967,10 +16047,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15978,7 +16058,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15993,28 +16073,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16027,10 +16107,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16038,7 +16118,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16053,28 +16133,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16145,10 +16225,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16156,7 +16236,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16171,28 +16251,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16205,10 +16285,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16216,7 +16296,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16231,28 +16311,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16353,7 +16433,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -16520,10 +16600,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -16531,7 +16611,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16546,28 +16626,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16579,10 +16659,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16590,7 +16670,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16605,28 +16685,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16710,7 +16790,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -17029,7 +17109,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -17150,7 +17230,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17169,7 +17249,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17855,7 +17935,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -18068,7 +18148,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -18131,7 +18211,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -18503,7 +18583,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19982,10 +20062,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20003,7 +20083,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20042,7 +20122,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20060,7 +20140,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -20193,10 +20273,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20316,7 +20396,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20481,7 +20561,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20510,7 +20590,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -20726,7 +20806,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -20821,7 +20901,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20874,7 +20954,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -20965,7 +21049,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21089,7 +21173,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21181,7 +21265,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21283,7 +21367,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21313,7 +21397,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21782,7 +21866,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -21811,7 +21895,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -21827,7 +21911,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -21844,7 +21928,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21925,7 +22009,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -22013,10 +22097,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22084,7 +22168,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -22418,7 +22502,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22472,7 +22556,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22480,7 +22564,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22683,7 +22767,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -23125,7 +23209,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23360,7 +23444,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23452,7 +23536,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23581,7 +23665,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23673,7 +23757,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23897,7 +23981,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24232,7 +24316,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24244,7 +24328,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24293,7 +24377,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24305,7 +24389,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24332,7 +24416,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24344,7 +24428,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24379,7 +24463,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24475,10 +24559,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24934,7 +25018,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -25090,7 +25174,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25145,7 +25229,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25399,7 +25483,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -25489,7 +25573,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25874,11 +25958,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25974,7 +26058,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -26443,7 +26527,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26886,7 +26970,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27170,7 +27254,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27225,7 +27309,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27312,7 +27396,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -27334,7 +27418,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -27405,83 +27489,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -27584,20 +27599,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -27662,14 +27677,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -27678,7 +27693,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -27787,7 +27802,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -28807,9 +28822,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -31512,7 +31527,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -31821,7 +31836,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -37729,7 +37744,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -41074,7 +41089,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -41138,7 +41153,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -45069,7 +45084,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46514,7 +46529,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -47332,7 +47347,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -47353,7 +47368,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -47951,7 +47966,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -48262,7 +48277,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -48275,7 +48290,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -48334,7 +48349,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); return; } @@ -48347,7 +48362,7 @@ addNewMethodToNSCache(sqInt rule) GIV(nsMethodCache)[probe + NSMethodCacheCallingMethod] = GIV(method); GIV(nsMethodCache)[probe + NSMethodCacheDepthOrLookupRule] = rule; GIV(nsMethodCache)[probe + NSMethodCacheTargetMethod] = GIV(newMethod); - GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(nsMethodCache)[probe + NSMethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); GIV(nsMethodCache)[probe + NSMethodCacheActualReceiver] = GIV(localAbsentReceiverOrZero); for (p = 1; p < CacheProbeMax; p += 1) { probe = (((usqInt) hash) >> p) & NSMethodCacheMask; @@ -48436,7 +48451,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -49230,7 +49245,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -49619,7 +49634,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -49927,7 +49942,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -50017,7 +50032,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -50825,7 +50840,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -51071,7 +51086,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -51213,7 +51228,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52775,7 +52790,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -52942,18 +52957,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -52971,7 +52974,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -53540,7 +53543,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -54953,10 +54956,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -55364,7 +55367,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -55497,7 +55500,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -55878,7 +55881,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -56264,7 +56267,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -57393,7 +57396,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -58174,12 +58177,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -58207,7 +58210,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -58711,7 +58714,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -59182,7 +59185,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -59209,11 +59212,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -60319,7 +60322,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -60534,7 +60537,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60689,7 +60692,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60869,6 +60872,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -60882,9 +60886,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -61128,14 +61137,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -61389,7 +61398,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -61464,7 +61473,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61518,8 +61527,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -61531,7 +61540,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -61554,8 +61563,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -62054,7 +62063,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -62073,16 +62082,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -62096,25 +62105,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -62122,7 +62131,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -62265,10 +62274,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -62346,7 +62355,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -62506,7 +62515,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -62708,7 +62717,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -63050,7 +63059,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -63856,10 +63865,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -64018,11 +64027,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -64167,11 +64176,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -64288,8 +64297,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -64716,7 +64725,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -64752,7 +64761,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -65171,7 +65180,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -65181,7 +65190,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -65220,7 +65229,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -65296,7 +65305,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -65388,7 +65397,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65499,7 +65508,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -65591,7 +65600,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65810,12 +65819,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -66089,7 +66098,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -66098,7 +66107,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -66138,7 +66147,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -66238,11 +66247,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -66320,7 +66329,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -66749,7 +66758,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -66841,7 +66850,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67134,7 +67143,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -67149,7 +67158,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -67176,9 +67185,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -67187,9 +67196,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -67198,7 +67207,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -67210,7 +67219,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -67298,7 +67307,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -67332,7 +67341,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -67401,7 +67410,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -67409,7 +67418,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -67428,7 +67437,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -67436,7 +67445,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67447,12 +67456,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67464,7 +67473,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67581,7 +67590,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -68080,17 +68089,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68099,7 +68108,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -68126,80 +68135,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); @@ -68207,7 +68216,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68215,15 +68224,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68346,13 +68355,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 1) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68376,15 +68385,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -68428,22 +68437,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -68455,43 +68464,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -68499,37 +68508,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -68538,21 +68547,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -68590,12 +68599,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -68605,13 +68614,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -68663,7 +68672,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -68674,13 +68683,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -68689,7 +68698,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -68700,7 +68709,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68709,7 +68718,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68717,7 +68726,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68725,7 +68734,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68745,7 +68754,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/nsspurstacksrc/vm/vmCallback.h b/nsspurstacksrc/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/nsspurstacksrc/vm/vmCallback.h +++ b/nsspurstacksrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c b/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c index d4ad2c9dc1..762ce7780f 100644 --- a/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c +++ b/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c @@ -243,7 +243,7 @@ static void fastPathRightToLeft(operation_t *op, uint32_t flags) operation_t opToDest = *op; uint32_t shift = log2table[op->src.depth]; uint32_t stride = op->src.pitch; - uint32_t line = (uint32_t) op->src.bits; + uint32_t line = (uint32_t) ((usqIntptr_t)op->src.bits & 0xFFFFFFFFU); /* Convert to pixels. It doesn't matter if we lose the MS bits of * addresses, since they're passed down as pixel offsets anyway */ if (shift > 3) { @@ -360,7 +360,7 @@ static void fastPathDepthConv(operation_t *op, uint32_t flags) operation_t opToDest = *op; uint32_t shift = log2table[op->dest.depth]; uint32_t stride = op->src.pitch; - uint32_t line = (uint32_t) op->dest.bits; + uint32_t line = (uint32_t) ((usqIntptr_t)op->dest.bits & 0xFFFFFFFFU); /* Convert to pixels. It doesn't matter if we lose the MS bits of * addresses, since they're passed down as pixel offsets anyway */ if (shift > 3) { diff --git a/platforms/Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c b/platforms/Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c index 6e516357bd..07931b4171 100644 --- a/platforms/Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c +++ b/platforms/Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c @@ -17,7 +17,8 @@ static fn_ioFindSurface findSurface = 0; extern struct VirtualMachine *interpreterProxy; /******************* Surface manager entry points *******************/ -static int memGetSurfaceFormat(memSurface *ms, int *w, int *h, int *d, int *msbFlag) { +static int memGetSurfaceFormat(sqIntptr_t handle, int *w, int *h, int *d, int *msbFlag) { + memSurface *ms = (memSurface *) handle; *w = ms->width; *h = ms->height; *d = ms->depth; @@ -25,18 +26,19 @@ static int memGetSurfaceFormat(memSurface *ms, int *w, int *h, int *d, int *msbF return 1; } -static int memLock(memSurface *ms, int *stride, int x, int y, int w, int h){ +static sqIntptr_t memLock(sqIntptr_t handle, int *stride, int x, int y, int w, int h){ /* Locking can be safely ignored for memory surfaces but we need to fill in the stride and return the bits */ + memSurface *ms = (memSurface *) handle; *stride = ms->stride; - return (int)ms->bits; + return (sqIntptr_t)ms->bits; } -static int memUnlock(memSurface *ms, int x, int y, int w, int h){ +static int memUnlock(sqIntptr_t handle, int x, int y, int w, int h){ return 1; /* ignored */ } -static int memShow(memSurface *ms, int x, int y, int w, int h) { +static int memShow(sqIntptr_t handle, int x, int y, int w, int h) { /* unsupported */ return 0; } @@ -65,7 +67,7 @@ int memCreateSurfaceWidthHeightDepth(int w, int h, int d) { ms->stride = w * (d >> 3); ms->bits = calloc(ms->stride, ms->height); /* register memory surface */ - if(!(*registerSurface)((int)ms, &memSurfaceDispatch, &id)) { + if(!(*registerSurface)((sqIntptr_t)ms, &memSurfaceDispatch, &id)) { /* registration failed; bail */ free(ms->bits); free(ms); @@ -76,7 +78,7 @@ int memCreateSurfaceWidthHeightDepth(int w, int h, int d) { int memDestroySurface(int id) { memSurface *ms; - if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0; + if(!(*findSurface)(id, &memSurfaceDispatch, (sqIntptr_t*) &ms)) return 0; (*unregisterSurface)(id); free(ms->bits); free(ms); @@ -85,26 +87,26 @@ int memDestroySurface(int id) { int memGetSurfaceWidth(int id) { memSurface *ms; - if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0; + if(!(*findSurface)(id, &memSurfaceDispatch, (sqIntptr_t*) &ms)) return 0; return ms->width; } int memGetSurfaceHeight(int id) { memSurface *ms; - if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0; + if(!(*findSurface)(id, &memSurfaceDispatch, (sqIntptr_t*) &ms)) return 0; return ms->height; } int memGetSurfaceDepth(int id) { memSurface *ms; - if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0; + if(!(*findSurface)(id, &memSurfaceDispatch, (sqIntptr_t*) &ms)) return 0; return ms->depth; } -int memGetSurfaceBits(int id) { +sqIntptr_t memGetSurfaceBits(int id) { memSurface *ms; - if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0; - return (int) ms->bits; + if(!(*findSurface)(id, &memSurfaceDispatch, (sqIntptr_t*) &ms)) return 0; + return (sqIntptr_t) ms->bits; } int memInitialize(void) { diff --git a/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c b/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c index c7aee6303f..a4c887f9d6 100644 --- a/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c +++ b/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c @@ -57,7 +57,7 @@ struct VirtualMachine* interpreterProxy; #define objIsAlien(anOop) (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classAlien())) #define objIsUnsafeAlien(anOop) (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classUnsafeAlien())) -#define sizeField(alien) (*(long *)pointerForOop((sqInt)(alien) + BaseHeaderSize)) +#define sizeField(alien) (*(long long *)pointerForOop((sqInt)(alien) + BaseHeaderSize)) #define dataPtr(alien) pointerForOop((sqInt)(alien) + BaseHeaderSize + BytesPerOop) #define isIndirect(alien) (sizeField(alien) < 0) #define startOfParameterData(alien) (isIndirect(alien) \ @@ -69,7 +69,7 @@ struct VirtualMachine* interpreterProxy; : (void *)dataPtr(alien)) #define isSmallInt(oop) (((oop)&7)==1) -#define intVal(oop) (((long)(oop))>>3) +#define intVal(oop) (((long long)(oop))>>3) extern void loadFloatRegs(double,double,double,double); diff --git a/platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h b/platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h index d7f965ba21..3752c4cae2 100755 --- a/platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h +++ b/platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h @@ -157,9 +157,9 @@ int ffiLogCallOfLength(void *nameIndex, int nameLength); void initSurfacePluginFunctionPointers(); void initManualSurfaceFunctionPointers (fn_ioRegisterSurface, fn_ioUnregisterSurface, fn_ioFindSurface); -long createManualSurface - (long width, long height, long rowPitch, long depth, long isMSB); -long destroyManualSurface(long surfaceID); -long setManualSurfacePointer(long surfaceID, void* ptr); +int createManualSurface + (int width, int height, int rowPitch, int depth, int isMSB); +int destroyManualSurface(int surfaceID); +int setManualSurfacePointer(int surfaceID, void* ptr); #endif /* SQ_FFI_H */ diff --git a/platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c b/platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c index 6eeafd0c19..5707c092d5 100644 --- a/platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c +++ b/platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c @@ -53,10 +53,10 @@ typedef struct { /* Create the dispatch-table that SurfacePlugin will use to interact with instances of "struct ManualSurface" */ -static long manualSurfaceGetFormat(void *, long*, long*, long*, long*); -static long manualSurfaceLock(void *, long *, long, long, long, long); -static long manualSurfaceUnlock(void *, long, long, long, long); -static long manualSurfaceShow(void *, long, long, long, long); +static int manualSurfaceGetFormat(sqIntptr_t, int*, int*, int*, int*); +static sqIntptr_t manualSurfaceLock(sqIntptr_t, int *, int, int, int, int); +static int manualSurfaceUnlock(sqIntptr_t, int, int, int, int); +static int manualSurfaceShow(sqIntptr_t, int, int, int, int); static sqSurfaceDispatch manualSurfaceDispatch = { 1, 0, @@ -68,18 +68,18 @@ static sqSurfaceDispatch manualSurfaceDispatch = { /* sqSurfaceDispatch functions *****************************************************************************/ -long manualSurfaceGetFormat(void *surfaceArg, long* width, long* height, long* depth, long* isMSB) { - ManualSurface* surface = surfaceArg; +int manualSurfaceGetFormat(sqIntptr_t surfaceArg, int* width, int* height, int* depth, int* isMSB) { + ManualSurface* surface = (ManualSurface *)surfaceArg; *width = surface->width; *height = surface->height; *depth = surface->depth; *isMSB = surface->isMSB; - DPRINTF(("Getting Surface Format: %lx %ld %ld %ld %ld\n", (long) surface, *width, *height, *depth, *isMSB)); + DPRINTF(("Getting Surface Format: %" PRIxSQPTR " %ld %ld %ld %ld\n", (sqIntptr_t) surface, *width, *height, *depth, *isMSB)); return 1; } -long manualSurfaceLock(void *surfaceArg, long *pitch, long x, long y, long w, long h) { - ManualSurface* surface = surfaceArg; +sqIntptr_t manualSurfaceLock(sqIntptr_t surfaceArg, int *pitch, int x, int y, int w, int h) { + ManualSurface* surface = (ManualSurface *)surfaceArg; /* Ideally, would be atomic. But it doens't matter for the forseeable future, since it is only called via BitBlt primitives. */ int wasLocked = surface->isLocked; @@ -96,18 +96,18 @@ long manualSurfaceLock(void *surfaceArg, long *pitch, long x, long y, long w, lo /* Success! Return the pointer. */ *pitch = surface->rowPitch; - DPRINTF(("Locked Surface: %lx Input Rect: %ld %ld %ld %ld Row Pitch: %ld\n", (long) surface, x, y, w, h, *pitch)); - return (long)(surface->ptr); + DPRINTF(("Locked Surface: %" PRIxSQPTR " Input Rect: %ld %ld %ld %ld Row Pitch: %ld\n", (sqIntptr_t) surface, x, y, w, h, *pitch)); + return (sqIntptr_t)(surface->ptr); } -long manualSurfaceUnlock(void *surfaceArg, long x, long y, long w, long h) { - ManualSurface* surface = surfaceArg; +int manualSurfaceUnlock(sqIntptr_t surfaceArg, int x, int y, int w, int h) { + ManualSurface* surface = (ManualSurface *)surfaceArg; surface->isLocked = 0; - DPRINTF(("Unlocked Surface: %lx Rect: %ld %ld %ld %ld\n", (long) surface, x, y, w, h)); + DPRINTF(("Unlocked Surface: %" PRIxSQPTR " Rect: %ld %ld %ld %ld\n", (sqIntptr_t) surface, x, y, w, h)); return 1; } -long manualSurfaceShow(void *surfaceArg, long x, long y, long w, long h) { +int manualSurfaceShow(sqIntptr_t surfaceArg, int x, int y, int w, int h) { /* Unsupported */ return 0; } @@ -115,9 +115,9 @@ long manualSurfaceShow(void *surfaceArg, long x, long y, long w, long h) { /* primitive interface functions (i.e. called from Squeak) *********************************************/ /* Answer non-negative surfaceID if successful, and -1 for failure. */ -long createManualSurface(long width, long height, long rowPitch, long depth, long isMSB) { +int createManualSurface(int width, int height, int rowPitch, int depth, int isMSB) { ManualSurface* newSurface; - long surfaceID, result; + int surfaceID, result; if (width < 0) return -1; if (height < 0) return -1; @@ -135,7 +135,7 @@ long createManualSurface(long width, long height, long rowPitch, long depth, lon newSurface->ptr = NULL; newSurface->isLocked = FALSE; - result = registerSurface((long)newSurface, &manualSurfaceDispatch, &surfaceID); + result = registerSurface((sqIntptr_t)newSurface, &manualSurfaceDispatch, &surfaceID); if (!result) { /* Failed to register surface. */ free(newSurface); @@ -144,21 +144,21 @@ long createManualSurface(long width, long height, long rowPitch, long depth, lon return surfaceID; } -long destroyManualSurface(long surfaceID) { +int destroyManualSurface(int surfaceID) { if (!unregisterSurface) return 0; /* failure... couldn't init function-pointer */ return unregisterSurface(surfaceID); } -long setManualSurfacePointer(long surfaceID, void* ptr) { - long surfaceHandle; +int setManualSurfacePointer(int surfaceID, void* ptr) { + sqIntptr_t surfaceHandle; ManualSurface *surface; - long result; + int result; if (!findSurface) return FALSE; /* failure... couldn't init function-pointer */ result = findSurface(surfaceID, NULL, &surfaceHandle); if (!result) return FALSE; /* failed to find surface */ surface = (ManualSurface*)surfaceHandle; if (surface->isLocked) return FALSE; /* can't set pointer while surface is locked */ surface->ptr = ptr; - DPRINTF(("Set Surface: %lx Pointer: %lx\n", surfaceID, (long)ptr)); + DPRINTF(("Set Surface: %lx Pointer: %" PRIxSQPTR "\n", surfaceID, (sqIntptr_t)ptr)); return TRUE; } diff --git a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c index 14b404d294..14fb947d74 100644 --- a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c +++ b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c @@ -37,8 +37,8 @@ typedef struct SqueakSurface { } SqueakSurface; static SqueakSurface *surfaceArray = NULL; -static long numSurfaces = 0; -static long maxSurfaces = 0; +static int numSurfaces = 0; +static int maxSurfaces = 0; #ifdef SQUEAK_BUILTIN_PLUGIN static const char *moduleName = "SurfacePlugin "__DATE__" (i)"; @@ -57,23 +57,23 @@ EXPORT(long) initialiseModule(void); EXPORT(long) shutdownModule(void); /* critical FXBlt entry points */ -EXPORT(long) ioGetSurfaceFormat (long surfaceID, long* width, long* height, long* depth, long* isMSB); -EXPORT(long) ioLockSurface (long surfaceID, long *pitch, long x, long y, long w, long h); -EXPORT(long) ioUnlockSurface(long surfaceID, long x, long y, long w, long h); +EXPORT(int) ioGetSurfaceFormat (int surfaceID, int* width, int* height, int* depth, int* isMSB); +EXPORT(sqIntptr_t) ioLockSurface (int surfaceID, int *pitch, int x, int y, int w, int h); +EXPORT(int) ioUnlockSurface(int surfaceID, int x, int y, int w, int h); /* interpreter entry point */ -EXPORT(long) ioShowSurface(long surfaceID, long x, long y, long w, long h); +EXPORT(int) ioShowSurface(int surfaceID, int x, int y, int w, int h); /* client entry points */ -EXPORT(long) ioRegisterSurface(long surfaceHandle, sqSurfaceDispatch *fn, long *surfaceID); -EXPORT(long) ioUnregisterSurface(long surfaceID); -EXPORT(long) ioFindSurface(long surfaceID, sqSurfaceDispatch *fn, long *surfaceHandle); +EXPORT(int) ioRegisterSurface(sqIntptr_t surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID); +EXPORT(int) ioUnregisterSurface(int surfaceID); +EXPORT(int) ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, sqIntptr_t *surfaceHandle); #pragma export off /* ioGetSurfaceFormat: Return information describing the given surface. Return true if successful, false otherwise. */ -EXPORT(long) ioGetSurfaceFormat (long surfaceID, long* width, long* height, long* depth, long* isMSB) +EXPORT(int) ioGetSurfaceFormat (int surfaceID, int* width, int* height, int* depth, int* isMSB) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; @@ -87,7 +87,7 @@ EXPORT(long) ioGetSurfaceFormat (long surfaceID, long* width, long* height, long Lock the bits of the surface. Return a pointer to the actual surface bits, or NULL on failure. */ -EXPORT(long) ioLockSurface (long surfaceID, long *pitch, long x, long y, long w, long h) +EXPORT(sqIntptr_t) ioLockSurface (int surfaceID, int *pitch, int x, int y, int w, int h) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; @@ -100,7 +100,7 @@ EXPORT(long) ioLockSurface (long surfaceID, long *pitch, long x, long y, long w, /* ioUnlockSurface: Unlock the bits of the surface. The return value is ignored. */ -EXPORT(long) ioUnlockSurface(long surfaceID, long x, long y, long w, long h) +EXPORT(int) ioUnlockSurface(int surfaceID, int x, int y, int w, int h) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; @@ -112,7 +112,7 @@ EXPORT(long) ioUnlockSurface(long surfaceID, long x, long y, long w, long h) /* ioShowSurface: Transfer the bits of a surface to the screen. */ -EXPORT(long) ioShowSurface(long surfaceID, long x, long y, long w, long h) +EXPORT(int) ioShowSurface(int surfaceID, int x, int y, int w, int h) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; @@ -127,9 +127,9 @@ EXPORT(long) ioShowSurface(long surfaceID, long x, long y, long w, long h) the set of surface functions. The new ID is returned in surfaceID. Returns true if successful, false otherwise. */ -EXPORT(long) ioRegisterSurface(long surfaceHandle, sqSurfaceDispatch *fn, long *surfaceID) +EXPORT(int) ioRegisterSurface(sqIntptr_t surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID) { - long index; + int index; if(!fn) return 0; if(fn->majorVersion != 1 && fn->minorVersion != 0) return 0; @@ -155,9 +155,9 @@ EXPORT(long) ioRegisterSurface(long surfaceHandle, sqSurfaceDispatch *fn, long * } /* ioUnregisterSurface: - Unregister the surface with the given handle. + Unregister the surface with the given ID. Returns true if successful, false otherwise. */ -EXPORT(long) ioUnregisterSurface(long surfaceID) +EXPORT(int) ioUnregisterSurface(int surfaceID) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) return 0; @@ -174,7 +174,7 @@ EXPORT(long) ioUnregisterSurface(long surfaceID) the given set of surface functions. The registered handle is returned in surfaceHandle. Return true if successful (e.g., the surface has been found), false otherwise. */ -EXPORT(long) ioFindSurface(long surfaceID, sqSurfaceDispatch *fn, long *surfaceHandle) +EXPORT(int) ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, sqIntptr_t *surfaceHandle) { SqueakSurface *surface; if(surfaceID < 0 || surfaceID >= maxSurfaces) return 0; diff --git a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.h b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.h index d7e350f663..128ad3fd6e 100644 --- a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.h +++ b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.h @@ -1,22 +1,24 @@ #ifndef __SQ_DRAW_SURFACE_H #define __SQ_DRAW_SURFACE_H + +#include "sqMemoryAccess.h" /* v1.0 */ #define SQ_SURFACE_MAJOR 1 #define SQ_SURFACE_MINOR 0 /* Plugins creating their own surfaces must register these using the following set of functions. The typedefs are for easier casts. */ -typedef long (*fn_getSurfaceFormat)(void * surfaceHandle, long* width, long* height, long* depth, long* isMSB); -typedef long (*fn_lockSurface)(void * surfaceHandle, long *pitch, long x, long y, long w, long h); -typedef long (*fn_unlockSurface)(void * surfaceHandle, long x, long y, long w, long h); -typedef long (*fn_showSurface)(void * surfaceHandle, long x, long y, long w, long h); +typedef int (*fn_getSurfaceFormat)(sqIntptr_t surfaceHandle, int* width, int* height, int* depth, int* isMSB); +typedef sqIntptr_t (*fn_lockSurface)(sqIntptr_t surfaceHandle, int *pitch, int x, int y, int w, int h); +typedef int (*fn_unlockSurface)(sqIntptr_t surfaceHandle, int x, int y, int w, int h); +typedef int (*fn_showSurface)(sqIntptr_t surfaceHandle, int x, int y, int w, int h); typedef struct sqSurfaceDispatch { /* Version information. Must be provided by the client so the surface manager can check if certain operations are supported. */ - long majorVersion; - long minorVersion; + int majorVersion; + int minorVersion; /* Version 1.0 */ fn_getSurfaceFormat getSurfaceFormat; @@ -27,14 +29,14 @@ typedef struct sqSurfaceDispatch { /* The functions for sqSurfaceDispatch are: - long getSurfaceFormat(long handle, long* width, long* height, long* depth, long* isMSB); + int getSurfaceFormat(sqIntptr_t handle, int* width, int* height, int* depth, int* isMSB); Return general information about the OS drawing surface. Return true if successful, false otherwise. The returned values describe the basic properties such as width, height, depth and LSB vs. MSB pixels. - long lockSurface(long handle, long *pitch, long x, long y, long w, long h); + sqIntptr_t lockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h); Lock the bits of the surface. Return a pointer to the actual surface bits, or NULL on failure. If successful, store the pitch of the surface (e.g., the bytes @@ -65,14 +67,14 @@ typedef struct sqSurfaceDispatch { be inside the source and dest boundingBox) but it is not aligned to word boundaries yet. It is up to the support code to compute accurate alignment if necessary. - long unlockSurface(long handle, long x, long y, long w, long h); + int unlockSurface(sqIntptr_t handle, int x, int y, int w, int h); Unlock the bits of a (possibly modified) surface after BitBlt completed. The return value is ignored. The arguments provided specify the dirty region of the surface. If the surface is unmodified all arguments are set to zero. - long showSurface(long handle, long x, long y, long w, long h); + int showSurface(sqIntptr_t handle, int x, int y, int w, int h); Display the contents of the surface on the actual screen. If ioShowSurface() is called the surface in question represents @@ -81,9 +83,9 @@ typedef struct sqSurfaceDispatch { FXBlt uses a variant of the above functions which are exported from the surface plugin: - long ioGetSurfaceFormat(long surfaceID, long* width, long* height, long* depth, long* isMSB); - long ioLockSurface(long surfaceID, long *pitch, long x, long y, long w, long h); - long ioUnlockSurface(long surfaceID, long x, long y, long w, long h); + int ioGetSurfaceFormat(int surfaceID, int* width, int* height, int* depth, int* isMSB); + sqIntptr_t ioLockSurface(int surfaceID, int *pitch, int x, int y, int w, int h); + int ioUnlockSurface(int surfaceID, int x, int y, int w, int h); These functions are looked up in the registered surfaces and invoked as appropriate. The meaning of all values is exactly the same as for @@ -93,7 +95,7 @@ typedef struct sqSurfaceDispatch { Interpreter itself uses a separate entry point for updating the display - long ioShowSurface(long surfaceID, long x, long y, long w, long h); + int ioShowSurface(int surfaceID, int x, int y, int w, int h); since the management of deferred updates is currently an intrinsic property of the VM (which is bad - deferred updates should be a @@ -104,17 +106,17 @@ typedef struct sqSurfaceDispatch { /* The following are the entry points for the surface manager: - long ioRegisterSurface(long surfaceHandle, sqSurfaceDispatch *fn, long *surfaceID); + int ioRegisterSurface(sqIntptr_t surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID); Register a new surface with the given handle and the set of surface functions. The new ID is returned in surfaceID. Returns true if successful, false otherwise. - long ioUnregisterSurface(long surfaceID); - Unregister the surface with the given handle. + int ioUnregisterSurface(int surfaceID); + Unregister the surface with the given ID. Returns true if successful, false otherwise. - long ioFindSurface(long surfaceID, sqSurfaceDispatch *fn, long *surfaceHandle); + int ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, sqIntptr_t *surfaceHandle); Find the surface with the given ID, and, optionally, the given set of surface functions. The registered handle is returned in surfaceHandle. Return true if successful @@ -124,8 +126,8 @@ typedef struct sqSurfaceDispatch { interpreterProxy->ioLoadFunctionFrom("ioRegisterSurface","SurfacePlugin"); The typedefs below are for easier casts. */ -typedef long (*fn_ioRegisterSurface)(long surfaceHandle, sqSurfaceDispatch *fn, long *surfaceID); -typedef long (*fn_ioUnregisterSurface)(long surfaceID); -typedef long (*fn_ioFindSurface)(long surfaceID, sqSurfaceDispatch *fn, long *surfaceHandle); +typedef int (*fn_ioRegisterSurface)(sqIntptr_t surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID); +typedef int (*fn_ioUnregisterSurface)(int surfaceID); +typedef int (*fn_ioFindSurface)(int surfaceID, sqSurfaceDispatch *fn, sqIntptr_t *surfaceHandle); #endif /* __SQ_DRAW_SURFACE_H */ diff --git a/platforms/Cross/vm/dispdbg.h b/platforms/Cross/vm/dispdbg.h index 832a1ea454..89ff657426 100644 --- a/platforms/Cross/vm/dispdbg.h +++ b/platforms/Cross/vm/dispdbg.h @@ -149,7 +149,7 @@ void closeBytecodeTraceFile() { if (bct) { fclose(bct); bct = 0; } } # endif # define bytecodeDispatchDebugHook() do { char line[64], expected[64]; \ /* print byteCount pc byteCode(hex) stackPtr */ \ - sprintf(expected, "%ld: %d %d(%x) %d %s\n", \ + snprintf(expected, sizeof(expected), "%ld: %d %d(%x) %d %s\n", \ ++GIV(byteCount), localIP-GIV(method)-3, currentBytecode, currentBytecode, \ (localFP-localSP)/sizeof(sqInt)-5, bytecodeNameTable[currentBytecode]); \ printf(expected); \ diff --git a/platforms/Cross/vm/sqSCCSVersion.h b/platforms/Cross/vm/sqSCCSVersion.h index d121fe8fe7..053eb94b11 100644 --- a/platforms/Cross/vm/sqSCCSVersion.h +++ b/platforms/Cross/vm/sqSCCSVersion.h @@ -128,7 +128,7 @@ sourceVersionString(char separator) + strlen(pluginsRevisionAsString()) + strlen(pluginsRepositoryURL()); sourceVersion = malloc(len); - sprintf(sourceVersion, fmt, + snprintf(sourceVersion, len, fmt, revisionAsString(), repositoryURL(), revisionDateAsString(), separator, pluginsRevisionAsString(), pluginsRepositoryURL()); diff --git a/platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c b/platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c index 041559d7fe..2f4cca9ce1 100644 --- a/platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c +++ b/platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c @@ -27,10 +27,10 @@ static fn_ioRegisterSurface registerSurface = 0; static fn_ioUnregisterSurface unregisterSurface = 0; static fn_ioFindSurface findSurface = 0; -int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *handle, int* width, int* height, int* depth, int* isMSB); -int QuicktimeLockSurface(QuickTimeBitMapForSqueak *handle, int *pitch, int x, int y, int w, int h); -int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h); -int QuicktimeShowSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h); +int QuicktimeGetSurfaceFormat(sqIntptr_t handle, int* width, int* height, int* depth, int* isMSB); +sqIntptr_t QuicktimeLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h); +int QuicktimeUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h); +int QuicktimeShowSurface(sqIntptr_t handle, int x, int y, int w, int h); struct VirtualMachine *interpreterProxy; @@ -64,7 +64,7 @@ sqInt sqQuicktimeShutdown() { return true; } -long stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie) +int stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie) { QuickTimeBitMapForSqueak *bitMap; int sqHandle; @@ -76,18 +76,18 @@ long stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width bitMap->rowBytes = rowBytes; bitMap->bits = buffer; bitMap->movie = movie; - (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle); + (*registerSurface)((sqIntptr_t) bitMap, &QuicktimeTargetDispatch, &sqHandle); return sqHandle; } -long stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie +int stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie (int sqHandle, char * buffer, int width, int height, int rowBytes, int depth, void *movie) { QuickTimeBitMapForSqueak *bitMap; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&bitMap)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&bitMap)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -98,7 +98,7 @@ long stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie bitMap->rowBytes = rowBytes; bitMap->bits = buffer; bitMap->movie = movie; - (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle); + (*registerSurface)((sqIntptr_t) bitMap, &QuicktimeTargetDispatch, &sqHandle); return sqHandle; } @@ -107,7 +107,7 @@ int stQuicktimeDestroySurface(int sqHandle) { QuickTimeBitMapForSqueak *myBM; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -120,7 +120,7 @@ int stQuicktimeDestroy(int sqHandle) { QuickTimeBitMapForSqueak *myBM; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -139,7 +139,7 @@ int stQuicktimeDestroy(int sqHandle) { int stQuicktimeSetSemaphorefor(int index, int sqHandle) { // interpreterProxy->signalSemaphoreWithIndex(state->semaIndex); QuickTimeBitMapForSqueak *myBM; - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -153,7 +153,7 @@ int stQuicktimeSetSemaphorefor(int index, int sqHandle) { int stQuicktimeClearSemaphore(int sqHandle) { QuickTimeBitMapForSqueak *myBM; - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -166,8 +166,9 @@ int stQuicktimeClearSemaphore(int sqHandle) { return 1; } -int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *myBM, int *width, int *height, int *depth, int *isMSB) { +int QuicktimeGetSurfaceFormat(sqIntptr_t handle, int *width, int *height, int *depth, int *isMSB) { /* fill in status information */ + QuickTimeBitMapForSqueak *myBM=(QuickTimeBitMapForSqueak) handle; *width = myBM->width; *height = myBM->height; *depth = myBM->depth; @@ -176,7 +177,7 @@ int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *myBM, int *width, int *h return 1; /* success - otherwise return zero */ } -int QuicktimeLockSurface(QuickTimeBitMapForSqueak *myBM, int *pitch, int x, int y, int w, int h) +sqIntptr_t QuicktimeLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h) { /* lock the region x,y - (x+w),(y+h) the area actually used is provided so that expensive @@ -184,11 +185,12 @@ int QuicktimeLockSurface(QuickTimeBitMapForSqueak *myBM, int *pitch, int x, int be avoided. See SurfacePlugin.h */ /* for our simple example, only fill in the pitch. No locking is required. */ + QuickTimeBitMapForSqueak *myBM=(QuickTimeBitMapForSqueak) handle; *pitch = myBM->rowBytes; - return (long) myBM->bits; /* success */ + return (sqIntptr_t) myBM->bits; /* success */ } -int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) { +int QuicktimeUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h) { /* Unlock a previously locked portion of myBM. The area describes the 'dirty region' which might need to be written back/flushed whatever. */ @@ -196,7 +198,7 @@ int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, return 1; } -int QuicktimeShowSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) { +int QuicktimeShowSurface(sqIntptr_t handle, int x, int y, int w, int h) { /* the surface represents Display - update the portion described in x,y,w,h */ /* for our simple example we just ignore this */ diff --git a/platforms/Mac OS/vm/sqMacWindow.c b/platforms/Mac OS/vm/sqMacWindow.c index b5697c565b..973b6028db 100644 --- a/platforms/Mac OS/vm/sqMacWindow.c +++ b/platforms/Mac OS/vm/sqMacWindow.c @@ -1515,10 +1515,10 @@ Boolean FindBestMatch (VideoRequestRecPtr requestRecPtr, short bitDepth, unsigne #include "SurfacePlugin.h" -int osxGetSurfaceFormat(int handle, int* width, int* height, int* depth, int* isMSB); -char *osxLockSurface(int handle, int *pitch, int x, int y, int w, int h); -int osxUnlockSurface(int handle, int x, int y, int w, int h); -int osxShowSurface(int handle, int x, int y, int w, int h); +int osxGetSurfaceFormat(sqIntptr_t handle, int* width, int* height, int* depth, int* isMSB); +sqIntptr_t osxLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h); +int osxUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h); +int osxShowSurface(sqIntptr_t handle, int x, int y, int w, int h); static sqSurfaceDispatch osxTargetDispatch = { @@ -1537,11 +1537,11 @@ static int surfaceID; void SetupSurface(int whichWindowIndex) { registerSurface = (fn_ioRegisterSurface) interpreterProxy->ioLoadFunctionFrom("ioRegisterSurface","SurfacePlugin"); unregisterSurface = (fn_ioUnregisterSurface) interpreterProxy->ioLoadFunctionFrom("ioUnregisterSurface","SurfacePlugin"); - (*registerSurface)(whichWindowIndex, &osxTargetDispatch, &surfaceID); + (*registerSurface)((sqIntptr_t)whichWindowIndex, &osxTargetDispatch, &surfaceID); } -int osxGetSurfaceFormat(int index, int* width, int* height, int* depth, int* isMSB) { +int osxGetSurfaceFormat(sqIntptr_t index, int* width, int* height, int* depth, int* isMSB) { PixMapHandle pix; Rect rectangle; @@ -1555,7 +1555,7 @@ int osxGetSurfaceFormat(int index, int* width, int* height, int* depth, int* isM return 1; } -char *osxLockSurface(int index, int *pitch, int x, int y, int w, int h) { +sqIntptr_t osxLockSurface(sqIntptr_t index, int *pitch, int x, int y, int w, int h) { static int rememberW=0; static int offsetTitle=0; windowDescriptorBlock *targetWindowBlock = windowBlockFromIndex(index); @@ -1583,15 +1583,15 @@ char *osxLockSurface(int index, int *pitch, int x, int y, int w, int h) { DisposeRgn(rect); } - return (char *)GetPixBaseAddr(pixMap) + offsetTitle; + return (sqIntptr_t)GetPixBaseAddr(pixMap) + offsetTitle; } -int osxUnlockSurface(int index, int x, int y, int w, int h) { +int osxUnlockSurface(sqIntptr_t index, int x, int y, int w, int h) { //NOPE UnlockPortBits(GetWindowPort(windowHandleFromIndex(index))); return 1; } -int osxShowSurface(int index, int x, int y, int w, int h) { +int osxShowSurface(sqIntptr_t index, int x, int y, int w, int h) { static RgnHandle dirtyRgn = NULL; static RgnHandle maskRect; extern long gSqueakUIFlushPrimaryDeferNMilliseconds; diff --git a/platforms/iOS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c b/platforms/iOS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c index 041559d7fe..2f4cca9ce1 100644 --- a/platforms/iOS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c +++ b/platforms/iOS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c @@ -27,10 +27,10 @@ static fn_ioRegisterSurface registerSurface = 0; static fn_ioUnregisterSurface unregisterSurface = 0; static fn_ioFindSurface findSurface = 0; -int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *handle, int* width, int* height, int* depth, int* isMSB); -int QuicktimeLockSurface(QuickTimeBitMapForSqueak *handle, int *pitch, int x, int y, int w, int h); -int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h); -int QuicktimeShowSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h); +int QuicktimeGetSurfaceFormat(sqIntptr_t handle, int* width, int* height, int* depth, int* isMSB); +sqIntptr_t QuicktimeLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h); +int QuicktimeUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h); +int QuicktimeShowSurface(sqIntptr_t handle, int x, int y, int w, int h); struct VirtualMachine *interpreterProxy; @@ -64,7 +64,7 @@ sqInt sqQuicktimeShutdown() { return true; } -long stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie) +int stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie) { QuickTimeBitMapForSqueak *bitMap; int sqHandle; @@ -76,18 +76,18 @@ long stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width bitMap->rowBytes = rowBytes; bitMap->bits = buffer; bitMap->movie = movie; - (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle); + (*registerSurface)((sqIntptr_t) bitMap, &QuicktimeTargetDispatch, &sqHandle); return sqHandle; } -long stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie +int stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie (int sqHandle, char * buffer, int width, int height, int rowBytes, int depth, void *movie) { QuickTimeBitMapForSqueak *bitMap; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&bitMap)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&bitMap)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -98,7 +98,7 @@ long stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie bitMap->rowBytes = rowBytes; bitMap->bits = buffer; bitMap->movie = movie; - (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle); + (*registerSurface)((sqIntptr_t) bitMap, &QuicktimeTargetDispatch, &sqHandle); return sqHandle; } @@ -107,7 +107,7 @@ int stQuicktimeDestroySurface(int sqHandle) { QuickTimeBitMapForSqueak *myBM; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -120,7 +120,7 @@ int stQuicktimeDestroy(int sqHandle) { QuickTimeBitMapForSqueak *myBM; /* see if the handle really describes a MyBitmap surface */ - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -139,7 +139,7 @@ int stQuicktimeDestroy(int sqHandle) { int stQuicktimeSetSemaphorefor(int index, int sqHandle) { // interpreterProxy->signalSemaphoreWithIndex(state->semaIndex); QuickTimeBitMapForSqueak *myBM; - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -153,7 +153,7 @@ int stQuicktimeSetSemaphorefor(int index, int sqHandle) { int stQuicktimeClearSemaphore(int sqHandle) { QuickTimeBitMapForSqueak *myBM; - if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) { + if( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (sqIntptr_t*) (&myBM)) ) { /* i don't know what it is but certainly not MyBitmap */ return interpreterProxy->primitiveFail(); } @@ -166,8 +166,9 @@ int stQuicktimeClearSemaphore(int sqHandle) { return 1; } -int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *myBM, int *width, int *height, int *depth, int *isMSB) { +int QuicktimeGetSurfaceFormat(sqIntptr_t handle, int *width, int *height, int *depth, int *isMSB) { /* fill in status information */ + QuickTimeBitMapForSqueak *myBM=(QuickTimeBitMapForSqueak) handle; *width = myBM->width; *height = myBM->height; *depth = myBM->depth; @@ -176,7 +177,7 @@ int QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *myBM, int *width, int *h return 1; /* success - otherwise return zero */ } -int QuicktimeLockSurface(QuickTimeBitMapForSqueak *myBM, int *pitch, int x, int y, int w, int h) +sqIntptr_t QuicktimeLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h) { /* lock the region x,y - (x+w),(y+h) the area actually used is provided so that expensive @@ -184,11 +185,12 @@ int QuicktimeLockSurface(QuickTimeBitMapForSqueak *myBM, int *pitch, int x, int be avoided. See SurfacePlugin.h */ /* for our simple example, only fill in the pitch. No locking is required. */ + QuickTimeBitMapForSqueak *myBM=(QuickTimeBitMapForSqueak) handle; *pitch = myBM->rowBytes; - return (long) myBM->bits; /* success */ + return (sqIntptr_t) myBM->bits; /* success */ } -int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) { +int QuicktimeUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h) { /* Unlock a previously locked portion of myBM. The area describes the 'dirty region' which might need to be written back/flushed whatever. */ @@ -196,7 +198,7 @@ int QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, return 1; } -int QuicktimeShowSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) { +int QuicktimeShowSurface(sqIntptr_t handle, int x, int y, int w, int h) { /* the surface represents Display - update the portion described in x,y,w,h */ /* for our simple example we just ignore this */ diff --git a/platforms/unix/vm/sqUnixCharConv.c b/platforms/unix/vm/sqUnixCharConv.c index 71aa3f8a86..c29a4278e4 100644 --- a/platforms/unix/vm/sqUnixCharConv.c +++ b/platforms/unix/vm/sqUnixCharConv.c @@ -251,7 +251,7 @@ static void iconvFail(char *toCode, char *fromCode) if (!warned++) { char buf[256]; - sprintf(buf, "iconv_open(%s, %s)", toCode, fromCode); + snprintf(buf, sizeof(buf), "iconv_open(%s, %s)", toCode, fromCode); perror(buf); } } diff --git a/platforms/unix/vm/sqUnixExternalPrims.c b/platforms/unix/vm/sqUnixExternalPrims.c index 8061d7fbac..fdfb18c6e4 100644 --- a/platforms/unix/vm/sqUnixExternalPrims.c +++ b/platforms/unix/vm/sqUnixExternalPrims.c @@ -161,7 +161,8 @@ tryLoadModule(char *in, char *name) continue; } } - sprintf(out, "/" MODULE_PREFIX "%s" MODULE_SUFFIX, name); + snprintf(out, sizeof(path) - (out - path), + "/" MODULE_PREFIX "%s" MODULE_SUFFIX, name); handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL); DPRINTF((stderr, __FILE__ " %d tryLoading dlopen(%s) = %p\n", __LINE__, path, handle)); if (!handle) { @@ -202,11 +203,7 @@ void *ioLoadModule(char *pluginName) /* try dlopen()ing LIBRARY_PREFIXLIBRARY_SUFFIX searching only the default locations modulo LD_LIBRARY_PATH et al */ -# if defined(HAVE_SNPRINTF) snprintf(path, sizeof(path), "%s%s%s", LIBRARY_PREFIX, pluginName, LIBRARY_SUFFIX); -# else - sprintf(path, "%s%s%s", LIBRARY_PREFIX, pluginName, LIBRARY_SUFFIX); -# endif handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL); DPRINTF((stderr, __FILE__ " %d ioLoadModule dlopen(%s) = %p%s\n", __LINE__, path, handle, handle ? "" : dlerror())); @@ -236,7 +233,7 @@ tryLoading(char *dirName, char *moduleName) char libName[NAME_MAX + 32]; /* headroom for prefix/suffix */ struct stat buf; int n; - n = sprintf(libName,"%s%s%s%s",dirName,*prefix,moduleName,*suffix); + n = snprintf(libName, sizeof(libName), "%s%s%s%s",dirName,*prefix,moduleName,*suffix); assert(n >= 0 && n < NAME_MAX + 32); if (!stat(libName, &buf)) { if (S_ISDIR(buf.st_mode)) @@ -277,7 +274,7 @@ static void *tryLoadingPath(char *varName, char *pluginName) path= strtok(0, ":")) { char buf[MAXPATHLEN]; - sprintf(buf, "%s/", path); + snprintf(buf, sizeof(buf), "%s/", path); DPRINTF((stderr, " path dir = %s\n", buf)); if ((handle= tryLoading(buf, pluginName)) != 0) break; @@ -384,7 +381,7 @@ ioLoadModule(char *pluginName) for (framework= frameworks; *framework; ++framework) { char path[NAME_MAX]; - sprintf(path, "%s/%s.framework/", *framework, pluginName); + snprintf(path, sizeof(path), "%s/%s.framework/", *framework, pluginName); if ((handle= tryLoading(path, pluginName))) return handle; } @@ -394,11 +391,7 @@ ioLoadModule(char *pluginName) /* finally (for VM hackers) try the pre-install build location */ { char pluginDir[MAXPATHLEN]; -# ifdef HAVE_SNPRINTF snprintf(pluginDir, sizeof(pluginDir), "%s%s/.libs/", vmPath, pluginName); -# else - sprintf(pluginDir, "%s%s/.libs/", vmPath, pluginName); -# endif if ((handle= tryLoading(pluginDir, pluginName))) return handle; } @@ -425,11 +418,7 @@ ioFindExternalFunctionIn(char *lookupName, void *moduleHandle) char buf[256]; void *fn; -#ifdef HAVE_SNPRINTF snprintf(buf, sizeof(buf), "%s", lookupName); -#else - sprintf(buf, "%s", lookupName); -#endif if (!*lookupName) /* avoid errors in dlsym from eitherPlugin: code. */ return 0; @@ -452,11 +441,7 @@ ioFindExternalFunctionIn(char *lookupName, void *moduleHandle) if (fn && accessorDepthPtr) { signed char *accessorDepthVarPtr; -# ifdef HAVE_SNPRINTF snprintf(buf+strlen(buf), sizeof(buf) - strlen(buf), "AccessorDepth"); -# else - sprintf(buf+strlen(buf), "AccessorDepth"); -# endif accessorDepthVarPtr = dlsym(moduleHandle, buf); /* The Slang machinery assumes accessor depth defaults to -1, which * means "no accessor depth". It saves space not outputting -1 depths. diff --git a/platforms/unix/vm/sqUnixMain.c b/platforms/unix/vm/sqUnixMain.c index 6d4b084119..2ee1c420db 100644 --- a/platforms/unix/vm/sqUnixMain.c +++ b/platforms/unix/vm/sqUnixMain.c @@ -586,7 +586,8 @@ static void emergencyDump(int quit) for (i= 0; ++i;) { struct stat sb; - sprintf(imageName, "%s-emergency-dump-%d.image", baseName, i); + snprintf(imageName, sizeof(imageName), "%s-emergency-dump-%d.image", + baseName, i); if (stat(imageName, &sb)) break; } @@ -1117,14 +1118,14 @@ struct SqModule *queryLoadModule(char *type, char *name, int query) char modName[MAXPATHLEN], itfName[32]; struct SqModule *module= 0; void *itf= 0; - sprintf(modName, "vm-%s-%s", type, name); + snprintf(modName, sizeof(modName), "vm-%s-%s", type, name); #ifdef DEBUG_MODULES printf("looking for module %s\n", modName); #endif modulesDo (module) if (!strcmp(module->name, modName)) return module; - sprintf(itfName, "%s_%s", type, name); + snprintf(itfName, sizeof(itfName), "%s_%s", type, name); itf= ioFindExternalFunctionIn(itfName, ioLoadModule(0)); if (!itf) { diff --git a/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32D3D.c b/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32D3D.c index 81f6d1a185..24d53ce3a7 100644 --- a/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32D3D.c +++ b/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32D3D.c @@ -190,9 +190,10 @@ static HRESULT d3dLock(LPDIRECTDRAWSURFACE7 lpdd, DDSURFACEDESC2 *ddsd, } /* d3dGetSurfaceFormat: Return information about the given surface. */ -static int d3dGetSurfaceFormat(LPDIRECTDRAWSURFACE7 lpddSurface, +static int d3dGetSurfaceFormat(sqIntptr_t handle, int* width, int* height, int* depth, int* isMSB) { + LPDIRECTDRAWSURFACE7 lpddSurface=(LPDIRECTDRAWSURFACE7) handle; DDSURFACEDESC2 desc; HRESULT hRes; @@ -210,9 +211,10 @@ static int d3dGetSurfaceFormat(LPDIRECTDRAWSURFACE7 lpddSurface, } /* d3dLockSurface: Lock the bits of the surface for BitBlt. */ -static sqIntptr_t d3dLockSurface(LPDIRECTDRAWSURFACE7 lpddSurface, +static sqIntptr_t d3dLockSurface(sqIntptr_t handle, int *pitch, int x, int y, int w, int h) { + LPDIRECTDRAWSURFACE7 lpddSurface=(LPDIRECTDRAWSURFACE7) handle; DDSURFACEDESC2 desc; HRESULT hRes; @@ -223,9 +225,10 @@ static sqIntptr_t d3dLockSurface(LPDIRECTDRAWSURFACE7 lpddSurface, } /* d3dUnlockSurface: Unlock the bits of a surface after BitBlt completed. */ -static int d3dUnlockSurface(LPDIRECTDRAWSURFACE7 lpddSurface, +static int d3dUnlockSurface(sqIntptr_t handle, int x, int y, int w, int h) { + LPDIRECTDRAWSURFACE7 lpddSurface=(LPDIRECTDRAWSURFACE7) handle; HRESULT hRes; hRes = lpddSurface->lpVtbl->Unlock(lpddSurface, NULL); @@ -237,7 +240,7 @@ static int d3dUnlockSurface(LPDIRECTDRAWSURFACE7 lpddSurface, } /* d3dShowSurface: Blt the modified contents of the surface to the screen. */ -static int d3dShowSurface(LPDIRECTDRAWSURFACE7 lpddSurface, +static int d3dShowSurface(sqIntptr_t handle, int x, int y, int w, int h) { /* unsupported */ @@ -909,7 +912,7 @@ static DDSURFACEDESC2 *d3dGetRendererDesc(int handle) { Note: This information could be obtained from the renderer directly but it's safer to see if the surface has really been registered. */ - if(!(*findSurface)(renderer->surfaceID, &d3dTargetDispatch, (int*) (&lpdsTarget))) { + if(!(*findSurface)(renderer->surfaceID, &d3dTargetDispatch, (sqIntptr_t*) (&lpdsTarget))) { return NULL; } /* But make sure we're talking about the right surface here */ @@ -1182,7 +1185,7 @@ int d3dDestroyTexture(int rendererHandle, int handle) /* return true on success, lpDevice = renderer->lpDevice; /* Look if the surface was registered as D3D surface */ - if(!(*findSurface)(handle, &d3dTextureDispatch, (int*) (&lpdsTexture))) + if(!(*findSurface)(handle, &d3dTextureDispatch, (sqIntptr_t*) (&lpdsTexture))) return 0; /* release and unregister texture */ @@ -1198,7 +1201,7 @@ int d3dActualTextureDepth(int rendererHandle, int handle) /* return depth or <0 DDSURFACEDESC2 desc; HRESULT hRes; /* Look if the surface was registered as D3D surface */ - if(!(*findSurface)(handle, &d3dTextureDispatch, (int*) (&lpdsTexture))) + if(!(*findSurface)(handle, &d3dTextureDispatch, (sqIntptr_t*) (&lpdsTexture))) return -1; desc.dwSize = sizeof(desc); hRes = lpdsTexture->lpVtbl->GetSurfaceDesc(lpdsTexture, &desc); @@ -1214,7 +1217,7 @@ int d3dTextureColorMasks(int rendererHandle, int handle, int masks[4]) /* retur DDSURFACEDESC2 desc; HRESULT hRes; /* Look if the surface was registered as D3D surface */ - if(!(*findSurface)(handle, &d3dTextureDispatch, (int*) (&lpdsTexture))) + if(!(*findSurface)(handle, &d3dTextureDispatch, (sqIntptr_t*) (&lpdsTexture))) return 0; desc.dwSize = sizeof(desc); hRes = lpdsTexture->lpVtbl->GetSurfaceDesc(lpdsTexture, &desc); @@ -1235,7 +1238,7 @@ int d3dTextureSurfaceHandle(int rendererHandle, int handle) { /* d3dTextures alias the texture and the surface handle */ LPDIRECTDRAWSURFACE7 lpdsTexture; /* Look if the surface was registered as D3D surface */ - if(!(*findSurface)(handle, &d3dTextureDispatch, (int*) (&lpdsTexture))) { + if(!(*findSurface)(handle, &d3dTextureDispatch, (sqIntptr_t*) (&lpdsTexture))) { DPRINTF3D(3, (fp, "WARNING: Texture (%d) not registered\n", handle)); return -1; } @@ -1977,7 +1980,7 @@ int d3dRenderVertexBuffer(int handle, int primType, int flags, int texHandle, fl if(texHandle >= 0 && (flags & B3D_VB_HAS_TEXTURES)) { /* Look if the surface was registered as D3D surface */ - if(!(*findSurface)(texHandle, &d3dTextureDispatch, (int*) (&lpdsTexture))) { + if(!(*findSurface)(texHandle, &d3dTextureDispatch, (sqIntptr_t*) (&lpdsTexture))) { DPRINTF3D(4, (fp,"WARNING: Texture (%d) not registered\n", texHandle)); lpdsTexture = NULL; } diff --git a/platforms/win32/plugins/DropPlugin/sqWin32Drop.c b/platforms/win32/plugins/DropPlugin/sqWin32Drop.c index 3b6ed2a4eb..9606691aa7 100644 --- a/platforms/win32/plugins/DropPlugin/sqWin32Drop.c +++ b/platforms/win32/plugins/DropPlugin/sqWin32Drop.c @@ -267,7 +267,7 @@ typedef struct DropTarget { static DropTarget stDropTarget; -static int numDropFiles; +static unsigned int numDropFiles = 0; static char** dropFiles = NULL; static void freeDropFiles(void) { @@ -758,15 +758,16 @@ char *dropRequestFileName(int dropIndex) { return dropFiles[dropIndex-1]; } -int dropRequestFileHandle(int dropIndex) { - int fileHandle, wasBrowserMode; +sqInt dropRequestFileHandle(sqInt dropIndex) { + sqInt fileHandle; + int wasBrowserMode; char *dropName = dropRequestFileName(dropIndex); if(!dropName) return interpreterProxy->nilObject(); fileHandle = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize()); wasBrowserMode = fBrowserMode; fBrowserMode = false; - sqFileOpen(fileValueOf(fileHandle),(sqInt)dropName, strlen(dropName), 0); + sqFileOpen(fileValueOf(fileHandle),dropName, strlen(dropName), 0); fBrowserMode = wasBrowserMode; return fileHandle; } diff --git a/platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c b/platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c index 34db24fb73..dd0b61c58b 100644 --- a/platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c +++ b/platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c @@ -294,7 +294,7 @@ sqInt ioShowDisplayOnWindow(unsigned char* dispBits, sqInt width, bmi->bmiHeader.biWidth = nPix; bmi->bmiHeader.biHeight = 1; bmi->bmiHeader.biSizeImage = 0; - bitsPtr = dispBits + start + (updateRect.top * pitch); + bitsPtr = (sqIntptr_t) dispBits + start + (updateRect.top * pitch); for(line = updateRect.top; line < updateRect.bottom; line++) { lines = SetDIBitsToDevice(dc, left, line, nPix, 1, 0, 0, 0, 1, (void*) bitsPtr, bmi, DIB_RGB_COLORS); @@ -311,14 +311,14 @@ sqInt ioShowDisplayOnWindow(unsigned char* dispBits, sqInt width, } /* reverse the image bits if necessary */ - if( !lsbDisplay && depth < 32 ) + if( !lsbDisplay && depth < 32 ) { if(depth == 16) reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); else reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); - + } return 1; } diff --git a/platforms/win32/plugins/JoystickTabletPlugin/sqWin32Joystick.c b/platforms/win32/plugins/JoystickTabletPlugin/sqWin32Joystick.c index 83988d9a65..bcd30c10d4 100644 --- a/platforms/win32/plugins/JoystickTabletPlugin/sqWin32Joystick.c +++ b/platforms/win32/plugins/JoystickTabletPlugin/sqWin32Joystick.c @@ -20,6 +20,11 @@ int numJoySticks=0; JOYCAPS *joySticks = NULL; +/* direct use of interpreter API */ +int methodArgumentCount(void); +int stackIntegerValue(int); +int failed(void); + int joystickRead(int index) { JOYINFO joyInfo; @@ -75,10 +80,6 @@ EXPORT(int) win32JoystickDebugInfo(void) int i; JOYCAPS *caps; - int methodArgumentCount(void); - int stackIntegerValue(int); - int failed(void); - if(methodArgumentCount() != 0) return primitiveFail(); warnPrintf(TEXT("<--- Joystick debug information --->\n")); for(i=0; iflags & MIDI_OUT_DEVICE) { /* reset output device */ @@ -898,6 +898,7 @@ int sqMIDIParameter(int whichParameter, int modify, int newValue) { midiInStart((HMIDIIN) (port->handle)); port->inBufferStart = port->inBufferEnd = 0; } + } } break; case sqMIDIClockTicksPerSec: diff --git a/platforms/win32/plugins/SecurityPlugin/sqWin32Security.c b/platforms/win32/plugins/SecurityPlugin/sqWin32Security.c index 3f5bac11f4..ca7496895a 100644 --- a/platforms/win32/plugins/SecurityPlugin/sqWin32Security.c +++ b/platforms/win32/plugins/SecurityPlugin/sqWin32Security.c @@ -236,7 +236,7 @@ sqInt ioInitSecurity(void) { WCHAR wDir[MAX_PATH+1]; TCHAR myDocumentsFolder[MAX_PATH+1]; HKEY hk; - int dirLen,i; + int dirLen; /* establish the secure user directory */ lstrcpy(secureUserDirectory, imagePath); diff --git a/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c b/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c index 4d336ba1d8..6f1265defe 100644 --- a/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c +++ b/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c @@ -442,7 +442,7 @@ static DWORD WINAPI readWatcherThread(privateSocketStruct *pss) { struct timeval tv= { 1000, 0 }; /* Timeout value == 1000 sec */ fd_set fds; - int n, doWait, sema; + int n, doWait; while(1) { doWait = 1; diff --git a/platforms/win32/plugins/SoundPlugin/sqWin32Sound.c b/platforms/win32/plugins/SoundPlugin/sqWin32Sound.c index 911684205a..5140b88107 100644 --- a/platforms/win32/plugins/SoundPlugin/sqWin32Sound.c +++ b/platforms/win32/plugins/SoundPlugin/sqWin32Sound.c @@ -174,7 +174,7 @@ sqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void* srcBufPtr, } /* mix in stuff */ { - int i; + unsigned int i; short *shortSrc = (short*)(((char*)srcBufPtr)+startIndex); short *shortDst = (short*)dstPtr; dstLen /=2; diff --git a/platforms/win32/vm/sqWin32Backtrace.c b/platforms/win32/vm/sqWin32Backtrace.c index 5070f14b3f..1b4e6960e4 100644 --- a/platforms/win32/vm/sqWin32Backtrace.c +++ b/platforms/win32/vm/sqWin32Backtrace.c @@ -319,7 +319,7 @@ get_modules(void) static dll_exports * dll_exports_for_pc(void *retpc) { - int i; + unsigned int i; if (!all_exports) get_modules(); @@ -517,7 +517,7 @@ compute_dll_symbols(dll_exports *exports) { char *dllbase = (char *)exports->module; PIMAGE_EXPORT_DIRECTORY pExportDir; - int i, j, n; + unsigned int i, j, n; PWORD ordinals; ulong *functions; ulong exportsStartRVA, exportsEndRVA; @@ -609,7 +609,7 @@ find_in_cog(dll_exports *exports, void *pc, symbolic_pc *spc) void printModuleInfo(FILE *f) { - int i; + unsigned int i; if (!all_exports) get_modules(); diff --git a/platforms/win32/vm/sqWin32Window.c b/platforms/win32/vm/sqWin32Window.c index ac816b64cf..57d074711d 100644 --- a/platforms/win32/vm/sqWin32Window.c +++ b/platforms/win32/vm/sqWin32Window.c @@ -2262,13 +2262,14 @@ sqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double targetRect.right = width; targetRect.bottom = height; #ifndef NO_BYTE_REVERSAL - if( depth < 32 ) + if( depth < 32 ) { if(depth == 16) reverse_image_words((unsigned int*) bitsAddr, (unsigned int*) bitsAddr, depth, width, &targetRect); else reverse_image_bytes((unsigned int*) bitsAddr, (unsigned int*) bitsAddr, depth, width, &targetRect); + } #endif /* NO_BYTE_REVERSAL */ if(GDI_ERROR == StretchDIBits(dc, @@ -2287,13 +2288,14 @@ sqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double /* reverse the image bits if necessary */ #ifndef NO_BYTE_REVERSAL - if( depth < 32 ) + if( depth < 32 ) { if(depth == 16) reverse_image_words((unsigned int*) bitsAddr, (unsigned int*) bitsAddr, depth, width, &targetRect); else reverse_image_bytes((unsigned int*) bitsAddr, (unsigned int*) bitsAddr, depth, width, &targetRect); + } #endif /* NO_BYTE_REVERSAL */ EndPage (dc); @@ -2480,13 +2482,14 @@ sqInt ioShowDisplay(sqInt dispBits, sqInt width, sqInt height, sqInt depth, /* reverse the image bits if necessary */ #ifndef NO_BYTE_REVERSAL PROFILE_BEGIN(PROFILE_DISPLAY) - if( !lsbDisplay && depth < 32 ) + if( !lsbDisplay && depth < 32 ) { if(depth == 16) reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); else reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); + } PROFILE_END(ticksForReversal) #endif /* NO_BYTE_REVERSAL */ @@ -2564,13 +2567,14 @@ sqInt ioShowDisplay(sqInt dispBits, sqInt width, sqInt height, sqInt depth, /* reverse the image bits if necessary */ #ifndef NO_BYTE_REVERSAL PROFILE_BEGIN(PROFILE_DISPLAY) - if( !lsbDisplay && depth < 32 ) + if( !lsbDisplay && depth < 32 ) { if(depth == 16) reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); else reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits, depth, width, &updateRect); + } PROFILE_END(ticksForReversal) #endif /* NO_BYTE_REVERSAL */ #endif /* defined(_WIN32_WCE) */ diff --git a/spur64src/vm/cogit.h b/spur64src/vm/cogit.h index 363edec3aa..22609a432d 100644 --- a/spur64src/vm/cogit.h +++ b/spur64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -117,15 +117,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/spur64src/vm/cogitX64.c b/spur64src/vm/cogitX64.c index 3648853215..006230ffd9 100644 --- a/spur64src/vm/cogitX64.c +++ b/spur64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -317,8 +317,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -434,7 +434,7 @@ static AbstractInstruction * NoDbgRegParms initializeSharableLiteral(AbstractIns static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal); static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); @@ -936,7 +936,7 @@ static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_ static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -1238,7 +1238,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceDereferenceSelectorIndex; @@ -1247,9 +1247,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1280,7 +1280,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1298,7 +1298,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1853,7 +1853,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1917,10 +1917,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2159,7 +2159,7 @@ isJump(AbstractInstruction * self_in_isJump) compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2304,9 +2304,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - unsigned long reg; + usqIntptr_t reg; sqInt reverse; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2341,9 +2341,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - unsigned long offset; - unsigned long reg; - unsigned long value; + usqIntptr_t offset; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2463,9 +2463,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -2861,7 +2861,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3854,7 +3854,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -4078,9 +4078,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4317,7 +4317,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 3) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4752,8 +4752,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -4798,8 +4798,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -4869,7 +4869,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt jumpTargetAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -5833,8 +5833,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5904,7 +5904,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5913,7 +5913,7 @@ generateClosedPICPrototype(void) sqInt literal; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; @@ -6001,7 +6001,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6050,7 +6050,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6154,7 +6154,7 @@ generateMapAtstart(sqInt addressOrNull, sqInt startAddress) sqInt location; sqInt mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6212,9 +6212,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6306,9 +6306,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6342,8 +6342,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -6363,7 +6363,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6377,7 +6377,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -6848,9 +6848,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -6879,7 +6879,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -8191,7 +8191,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -11651,7 +11651,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -12746,7 +12746,7 @@ genPrimitiveAtPut(void) /* begin JumpBelow: */ jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((sqInt)0xFFFFFFFFU << 3) | 1); + quickConstant6 = (((usqInt)0xFFFFFFFFU << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(CmpCqR, quickConstant6, Arg1Reg); /* begin JumpAbove: */ @@ -12774,7 +12774,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR((((sqInt)0xFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -12805,7 +12805,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR((((sqInt)0xFFFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -13232,7 +13232,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((maxSlots * 2) << 3) | 1); + quickConstant6 = (((usqInt)(maxSlots * 2) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -13262,7 +13262,7 @@ genPrimitiveNewWithArg(void) anInstruction9 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -13288,7 +13288,7 @@ genPrimitiveNewWithArg(void) anInstruction13 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 3) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -14252,7 +14252,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant1 = ((numArgs << 3) | 1); + quickConstant1 = (((usqInt)numArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant1, TempReg); /* begin MoveR:Mw:r: */ @@ -15223,13 +15223,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction6 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant1 = ((bcpc << 3) | 1); + quickConstant1 = (((usqInt)bcpc << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant1, TempReg); /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant2 = ((numArgs << 3) | 1); + quickConstant2 = (((usqInt)numArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant2, TempReg); /* begin MoveR:Mw:r: */ @@ -15355,7 +15355,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = (((sqInt)1 << 3) | 1); + quickConstant = (((usqInt)1 << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -15366,9 +15366,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = ((((sqInt)1 << 3) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 3) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -15384,7 +15384,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR(((((sqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -16756,7 +16756,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -16782,8 +16782,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - unsigned long reg; - unsigned long value; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -16820,7 +16820,7 @@ concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithC static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -16834,10 +16834,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - unsigned long base; - unsigned long index; + usqIntptr_t base; + usqIntptr_t index; sqInt offset; - unsigned long src; + usqIntptr_t src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -16871,9 +16871,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - unsigned long base; - unsigned long dest; - unsigned long index; + usqIntptr_t base; + usqIntptr_t dest; + usqIntptr_t index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -16908,8 +16908,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -16928,8 +16928,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long offset; - unsigned long operand; + usqIntptr_t offset; + usqIntptr_t operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -16956,8 +16956,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -16971,8 +16971,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - unsigned long r1; - unsigned long r2; + usqIntptr_t r1; + usqIntptr_t r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -17001,47 +17001,47 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long addressOperand5; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t addressOperand5; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; - unsigned long distance; - unsigned long distance1; - unsigned long distance2; - unsigned long distance3; - unsigned long distance4; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; + usqIntptr_t distance; + usqIntptr_t distance1; + usqIntptr_t distance2; + usqIntptr_t distance3; + usqIntptr_t distance4; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -17109,13 +17109,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; - unsigned long offset110; - unsigned long offset111; - unsigned long offset112; - unsigned long offset113; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; + usqIntptr_t offset110; + usqIntptr_t offset111; + usqIntptr_t offset112; + usqIntptr_t offset113; sqInt offset114; sqInt offset115; sqInt offset116; @@ -17134,13 +17134,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset128; sqInt offset129; sqInt offset13; - unsigned long offset14; - unsigned long offset15; + usqIntptr_t offset14; + usqIntptr_t offset15; sqInt offset16; sqInt offset17; - unsigned long offset18; - unsigned long offset19; - unsigned long offset2; + usqIntptr_t offset18; + usqIntptr_t offset19; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -17151,7 +17151,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -17162,91 +17162,91 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; sqInt offset9; - unsigned long operand; - unsigned long operand1; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regDivisor; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regToShift; - unsigned long regToShift1; - unsigned long save0; - unsigned long save01; - unsigned long save1; - unsigned long save11; - unsigned long save12; - unsigned long save13; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; + usqIntptr_t operand; + usqIntptr_t operand1; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regDivisor; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; + usqIntptr_t save0; + usqIntptr_t save01; + usqIntptr_t save1; + usqIntptr_t save11; + usqIntptr_t save12; + usqIntptr_t save13; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip2; sqInt skip3; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; - unsigned long value; - unsigned long value1; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long word; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t word; switch ((self_in_dispatchConcretize->opcode)) { @@ -20349,7 +20349,7 @@ isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc) /* CogX64Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((sqLong) operand)) >= -128) && ((((sqLong) operand)) <= 0x7F)); } @@ -20640,12 +20640,13 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -21208,7 +21209,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -21223,7 +21224,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -21727,7 +21728,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 3) | 1)); + return genPushLiteral((((usqInt)value << 3) | 1)); } @@ -22225,7 +22226,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -22271,7 +22272,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral((((sqInt)1 << 3) | 1)); + return genPushLiteral((((usqInt)1 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -22288,7 +22289,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral((((sqInt)0 << 3) | 1)); + return genPushLiteral((((usqInt)0 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -22332,7 +22333,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 3) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -22715,7 +22716,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -22737,15 +22738,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } return 4; } @@ -22968,9 +22969,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 3) | 1)); introspectionDataIndex += 4; return 0; } @@ -22988,17 +22989,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 3) | 1)); introspectionDataIndex += 6; return 0; @@ -23008,7 +23009,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); introspectionDataIndex += 2; } @@ -23600,7 +23601,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -24373,12 +24374,12 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -24439,13 +24440,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -25990,7 +25991,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 3) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -26065,7 +26066,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 3) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -26624,7 +26625,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 3) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 3) | 1))); } return genSpecialSelectorSend(); } diff --git a/spur64src/vm/cointerp.c b/spur64src/vm/cointerp.c index b526f7f0e7..9e1f3bab31 100644 --- a/spur64src/vm/cointerp.c +++ b/spur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -546,7 +546,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -642,7 +642,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -858,7 +858,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1452,7 +1452,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1501,7 +1501,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1546,8 +1546,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1771,7 +1771,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1779,12 +1779,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1827,7 +1827,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2448,7 +2448,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2583,7 +2583,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4485,7 +4485,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5476,7 +5476,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5542,7 +5542,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5608,7 +5608,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5674,7 +5674,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5914,7 +5914,7 @@ interpret(void) l469: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5940,7 +5940,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l471; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l471: /* end internalQuickPrimitiveResponse */; goto l468; } @@ -6080,7 +6080,7 @@ interpret(void) goto l463; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l463: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6250,7 +6250,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6324,7 +6324,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6462,7 +6462,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6896,10 +6896,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7253,7 +7253,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7279,7 +7279,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7316,7 +7316,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7396,7 +7396,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7422,7 +7422,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7459,7 +7459,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7560,7 +7560,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7597,7 +7597,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7741,7 +7741,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7778,7 +7778,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7912,7 +7912,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7949,7 +7949,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8044,7 +8044,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8081,7 +8081,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8173,7 +8173,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8210,7 +8210,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8302,7 +8302,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8339,7 +8339,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8424,7 +8424,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8452,7 +8452,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8489,7 +8489,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8575,7 +8575,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8602,7 +8602,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8639,7 +8639,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8708,7 +8708,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8812,7 +8812,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8849,7 +8849,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9013,7 +9013,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9039,7 +9039,7 @@ interpret(void) } sz = 0; l171: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9063,7 +9063,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9089,7 +9089,7 @@ interpret(void) } sz = 0; l170: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9684,7 +9684,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9710,7 +9710,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9747,7 +9747,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9827,7 +9827,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9853,7 +9853,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9890,7 +9890,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9991,7 +9991,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10028,7 +10028,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10171,7 +10171,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10208,7 +10208,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10342,7 +10342,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10379,7 +10379,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10474,7 +10474,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10511,7 +10511,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10603,7 +10603,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10640,7 +10640,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10732,7 +10732,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10769,7 +10769,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10854,7 +10854,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10882,7 +10882,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10919,7 +10919,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11005,7 +11005,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11032,7 +11032,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11069,7 +11069,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11138,7 +11138,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11242,7 +11242,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11279,7 +11279,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11421,7 +11421,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11447,7 +11447,7 @@ interpret(void) } sz = 0; l293: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11471,7 +11471,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11497,7 +11497,7 @@ interpret(void) } sz = 0; l292: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11828,7 +11828,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12001,7 +12001,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l327; } if (index == InstructionPointerIndex) { @@ -12170,7 +12170,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } break; case 489: /*233*/ @@ -12561,7 +12561,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12629,7 +12629,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12802,7 +12802,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12869,7 +12869,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13055,7 +13055,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13168,10 +13168,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13330,7 +13330,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l400; } if (slotIndex == InstructionPointerIndex) { @@ -13508,7 +13508,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13697,7 +13697,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14144,7 +14144,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14270,7 +14270,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14367,7 +14367,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14380,7 +14380,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15074,7 +15074,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16791,15 +16791,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -17174,7 +17174,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18123,7 +18123,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -18916,7 +18916,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19172,7 +19172,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -19439,7 +19439,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -19505,7 +19505,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -19516,22 +19516,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -20052,11 +20052,11 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -20269,12 +20269,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -20308,7 +20308,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -20815,9 +20815,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -20866,7 +20866,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -21062,7 +21062,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -21300,7 +21300,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21524,7 +21524,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21611,31 +21611,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -21645,66 +21635,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -21726,14 +21663,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -22065,7 +22002,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -22479,7 +22416,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -22651,7 +22588,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -22695,7 +22632,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -22741,7 +22678,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -22961,7 +22898,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -23340,7 +23277,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -23352,7 +23289,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24403,7 +24340,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -24442,7 +24379,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -24483,7 +24420,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -24567,7 +24504,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -24684,7 +24621,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -24842,7 +24779,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -24960,7 +24897,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -25068,7 +25005,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -25113,14 +25050,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -25141,7 +25078,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -25516,7 +25453,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25596,11 +25533,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25610,7 +25547,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -25649,7 +25586,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -25684,7 +25621,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -26165,7 +26102,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -26207,10 +26144,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26218,7 +26155,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26233,28 +26170,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26267,10 +26204,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26278,7 +26215,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26293,28 +26230,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26385,10 +26322,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26396,7 +26333,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26411,28 +26348,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26445,10 +26382,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26456,7 +26393,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26471,28 +26408,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26586,7 +26523,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -26713,10 +26650,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -26724,7 +26661,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26739,28 +26676,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26772,10 +26709,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -26783,7 +26720,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26798,28 +26735,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26903,7 +26840,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -27212,14 +27149,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -27251,7 +27188,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -27270,7 +27207,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -27860,7 +27797,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -28147,7 +28084,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28179,7 +28116,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -28293,7 +28230,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -28370,7 +28307,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -28423,7 +28360,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28459,7 +28396,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -28583,7 +28520,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28646,7 +28583,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28873,7 +28810,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28973,7 +28910,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29010,7 +28947,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29069,7 +29006,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -29083,7 +29020,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -29205,7 +29142,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29242,7 +29179,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29318,7 +29255,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29356,7 +29293,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29427,7 +29364,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29465,7 +29402,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29536,7 +29473,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29574,7 +29511,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29645,7 +29582,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29683,7 +29620,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29754,7 +29691,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29792,7 +29729,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29864,7 +29801,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29901,7 +29838,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29969,7 +29906,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30007,7 +29944,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30079,7 +30016,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30116,7 +30053,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30229,7 +30166,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -30269,7 +30206,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -30311,7 +30248,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -30434,7 +30371,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -30523,7 +30460,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30727,7 +30664,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30781,7 +30718,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30985,7 +30922,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31035,7 +30972,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31089,7 +31026,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -31276,7 +31213,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31424,10 +31361,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31445,7 +31382,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -31484,7 +31421,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -31502,7 +31439,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -31635,10 +31572,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31760,7 +31697,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -31782,7 +31719,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -31880,7 +31817,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -31902,7 +31839,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32088,7 +32025,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -32144,7 +32081,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -32183,7 +32120,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -32191,7 +32128,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -32217,6 +32154,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -32225,7 +32163,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32233,10 +32171,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32262,32 +32220,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32327,7 +32285,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -32522,7 +32480,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -32552,7 +32510,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33006,7 +32964,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -33035,7 +32993,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33051,7 +33009,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33068,7 +33026,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33149,7 +33107,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -33237,10 +33195,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33308,7 +33266,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -33636,7 +33594,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33682,7 +33640,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33690,7 +33648,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -33764,7 +33722,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -33806,7 +33764,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33837,7 +33795,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33893,7 +33851,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34094,7 +34052,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -34132,7 +34090,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -34243,7 +34201,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -34270,7 +34228,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -34398,7 +34356,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -34516,7 +34474,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -34767,7 +34725,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35074,7 +35032,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35086,7 +35044,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35135,7 +35093,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35147,7 +35105,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35174,7 +35132,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35186,7 +35144,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35221,7 +35179,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35317,10 +35275,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -35339,7 +35297,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -35596,7 +35554,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -35729,7 +35687,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -35771,7 +35729,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -35885,7 +35843,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -35940,7 +35898,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36123,7 +36081,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -36164,7 +36122,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -36252,7 +36210,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36325,7 +36283,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36341,7 +36299,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36395,7 +36353,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36433,7 +36391,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36449,7 +36407,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36516,7 +36474,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36532,7 +36490,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36596,7 +36554,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -36622,7 +36580,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36660,7 +36618,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36676,7 +36634,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36739,7 +36697,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36755,7 +36713,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36818,7 +36776,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36834,7 +36792,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36897,7 +36855,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36913,7 +36871,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36972,7 +36930,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37010,7 +36968,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37026,7 +36984,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37087,7 +37045,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37103,7 +37061,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37159,7 +37117,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37210,7 +37168,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37226,7 +37184,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37328,14 +37286,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -37548,7 +37506,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37628,11 +37586,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37642,7 +37600,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -37688,7 +37646,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37725,7 +37683,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37987,7 +37945,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -38038,7 +37996,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -38157,7 +38115,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38402,7 +38360,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38511,7 +38469,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38551,7 +38509,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38593,7 +38551,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38686,7 +38644,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38741,7 +38699,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38828,7 +38786,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -38859,20 +38817,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -38918,7 +38876,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -38937,14 +38895,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38953,7 +38911,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39103,7 +39061,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39139,7 +39097,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39177,7 +39135,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39374,7 +39332,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39729,7 +39687,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -39821,7 +39779,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -39958,7 +39916,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40041,7 +39999,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -40133,7 +40091,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40372,9 +40330,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -40454,7 +40412,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -40523,7 +40481,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40568,7 +40526,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40701,7 +40659,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40739,7 +40697,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -40800,7 +40758,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -41199,7 +41157,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -41256,9 +41214,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -41793,7 +41751,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -41966,7 +41924,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -42238,7 +42196,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42279,7 +42237,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42309,7 +42267,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -42711,7 +42669,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -42753,7 +42711,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -42808,7 +42766,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42856,7 +42814,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -42920,7 +42878,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -42981,7 +42939,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -43035,7 +42993,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -43090,7 +43048,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -43229,7 +43187,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -43266,7 +43224,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -43319,7 +43277,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43365,7 +43323,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -43403,7 +43361,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -43491,7 +43449,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -43529,7 +43487,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43569,7 +43527,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43626,7 +43584,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44529,7 +44487,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -44702,7 +44660,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44762,7 +44720,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44855,7 +44813,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45065,7 +45023,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45179,7 +45137,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45345,7 +45303,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45728,7 +45686,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46107,7 +46065,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46149,7 +46107,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -46235,7 +46193,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -46385,7 +46343,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46614,7 +46572,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46661,7 +46619,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46710,7 +46668,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46956,7 +46914,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -47090,7 +47048,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -47149,7 +47107,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -47222,7 +47180,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -47302,7 +47260,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47688,7 +47646,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47726,7 +47684,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47972,7 +47930,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48020,7 +47978,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48070,7 +48028,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48165,7 +48123,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48210,7 +48168,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48257,7 +48215,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48969,7 +48927,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48999,14 +48957,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -49037,7 +48995,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -49089,7 +49047,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49192,7 +49150,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -49209,7 +49167,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49518,7 +49476,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49556,7 +49514,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49596,7 +49554,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49706,9 +49664,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -49871,9 +49829,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -51025,7 +50983,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51065,7 +51023,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51204,7 +51162,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -51222,7 +51180,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51244,7 +51202,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51280,7 +51238,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -51350,7 +51308,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -51432,7 +51390,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51458,7 +51416,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -51552,7 +51510,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -51692,7 +51650,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51737,7 +51695,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51775,7 +51733,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51869,9 +51827,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -51897,7 +51855,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51939,9 +51897,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -51967,7 +51925,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52010,9 +51968,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52039,7 +51997,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -52149,9 +52107,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -52270,7 +52228,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -52487,7 +52445,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -52601,7 +52559,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -52667,7 +52625,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -53153,7 +53111,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -53211,7 +53169,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -53248,7 +53206,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53741,7 +53699,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -53808,7 +53766,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -53876,7 +53834,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -53919,7 +53877,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53955,7 +53913,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -54015,9 +53973,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -54055,7 +54013,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54069,7 +54027,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54101,7 +54059,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -54208,7 +54166,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54230,7 +54188,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -54253,7 +54211,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -54274,7 +54232,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -54352,7 +54310,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -54389,7 +54347,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54429,7 +54387,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -54993,7 +54951,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55039,7 +54997,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55087,7 +55045,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55189,7 +55147,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55242,7 +55200,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55297,7 +55255,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55370,7 +55328,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55415,7 +55373,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55453,7 +55411,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55544,7 +55502,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55587,7 +55545,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55625,7 +55583,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55801,13 +55759,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -55816,9 +55774,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -55977,7 +55935,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56022,7 +55980,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56060,7 +56018,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56207,7 +56165,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56258,7 +56216,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56311,7 +56269,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56410,7 +56368,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56455,7 +56413,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56493,7 +56451,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56624,7 +56582,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -56732,9 +56690,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -56781,7 +56739,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56832,9 +56790,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -56881,7 +56839,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56933,9 +56891,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -56983,7 +56941,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -57667,7 +57625,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -57873,7 +57831,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -57967,7 +57925,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -58021,7 +57979,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -58068,7 +58026,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -58105,7 +58063,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58228,9 +58186,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -58239,9 +58197,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -58278,7 +58236,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -58927,7 +58885,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58948,7 +58906,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -59258,7 +59216,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -59363,7 +59321,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -59486,7 +59444,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -59546,7 +59504,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -59664,8 +59622,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -60052,7 +60010,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -60088,7 +60046,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -60126,7 +60084,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -60519,7 +60477,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -61140,7 +61098,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61638,7 +61596,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -61704,7 +61662,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -61772,7 +61730,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61826,7 +61784,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61866,7 +61824,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61908,7 +61866,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -62289,7 +62247,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -62436,7 +62394,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -62535,7 +62493,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -62800,7 +62758,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -63871,7 +63829,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -64181,7 +64139,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -64196,7 +64154,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -64336,7 +64294,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -64441,7 +64399,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -64474,7 +64432,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -64609,7 +64567,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -64779,7 +64737,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -64946,7 +64904,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65101,7 +65059,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -65272,10 +65230,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -65714,7 +65672,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -66017,7 +65975,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -66216,7 +66174,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -66341,7 +66299,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -66555,7 +66513,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -66601,7 +66559,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -66646,7 +66604,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -66684,7 +66642,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -67286,7 +67244,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -67597,7 +67555,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -67834,7 +67792,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -68073,7 +68031,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -68190,7 +68148,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -68547,7 +68505,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -68580,7 +68538,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -69057,7 +69015,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -69084,11 +69042,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -70007,6 +69965,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -70020,13 +69979,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70282,7 +70246,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -70425,7 +70389,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70529,7 +70493,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70583,8 +70547,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70594,7 +70558,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70617,8 +70581,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -71056,7 +71020,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -71075,16 +71039,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -71098,25 +71062,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -71124,7 +71088,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -71185,7 +71149,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71263,10 +71227,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -71274,7 +71238,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -71305,14 +71269,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71465,7 +71429,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -71596,7 +71560,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71833,9 +71797,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -72003,7 +71967,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -72273,7 +72237,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -72353,11 +72317,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72367,7 +72331,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -72403,7 +72367,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72462,11 +72426,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72476,7 +72440,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -72547,8 +72511,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -72569,7 +72533,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -72736,7 +72700,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72907,7 +72871,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72982,7 +72946,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -73082,7 +73046,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -73151,7 +73115,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -73194,7 +73158,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -73362,7 +73326,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -73416,7 +73380,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73426,7 +73390,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73485,7 +73449,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -73778,7 +73742,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -73815,7 +73779,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -73860,12 +73824,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -74101,7 +74065,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -74110,7 +74074,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -74150,7 +74114,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -74190,7 +74154,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74246,11 +74210,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74260,7 +74224,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -74287,7 +74251,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -74319,7 +74283,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74571,7 +74535,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -74945,9 +74909,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -74962,7 +74926,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -74989,9 +74953,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -75000,9 +74964,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -75011,7 +74975,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -75023,10 +74987,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -75072,7 +75036,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -75104,9 +75068,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75175,7 +75139,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75183,7 +75147,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75202,7 +75166,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75210,7 +75174,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75221,12 +75185,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75238,7 +75202,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75249,12 +75213,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75372,7 +75336,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -75557,17 +75521,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75576,7 +75540,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -75603,80 +75567,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -75686,7 +75650,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75696,15 +75660,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75826,17 +75790,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75860,15 +75824,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -75912,22 +75876,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -75939,43 +75903,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -75983,37 +75947,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -76022,7 +75986,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76031,14 +75995,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -76073,15 +76037,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -76091,13 +76055,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -76150,7 +76114,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -76161,13 +76125,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -76176,7 +76140,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76187,7 +76151,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76196,7 +76160,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76204,7 +76168,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76213,7 +76177,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76221,7 +76185,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76244,7 +76208,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -76465,7 +76429,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -76519,7 +76483,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -76566,7 +76530,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spur64src/vm/cointerp.h b/spur64src/vm/cointerp.h index 72cec9930b..3dabf470a2 100644 --- a/spur64src/vm/cointerp.h +++ b/spur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -82,7 +82,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -326,8 +326,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -351,7 +351,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/spur64src/vm/gcc3x-cointerp.c b/spur64src/vm/gcc3x-cointerp.c index 41c41600e5..63a606244b 100644 --- a/spur64src/vm/gcc3x-cointerp.c +++ b/spur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -549,7 +549,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -645,7 +645,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -861,7 +861,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1455,7 +1455,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1504,7 +1504,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1549,8 +1549,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1774,7 +1774,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1782,12 +1782,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1830,7 +1830,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2451,7 +2451,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2586,7 +2586,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4494,7 +4494,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5485,7 +5485,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5551,7 +5551,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5617,7 +5617,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5683,7 +5683,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5923,7 +5923,7 @@ interpret(void) l469: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5949,7 +5949,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l471; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l471: /* end internalQuickPrimitiveResponse */; goto l468; } @@ -6089,7 +6089,7 @@ interpret(void) goto l463; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l463: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6259,7 +6259,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6333,7 +6333,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6471,7 +6471,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6905,10 +6905,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7262,7 +7262,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7288,7 +7288,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7325,7 +7325,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7405,7 +7405,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7431,7 +7431,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7468,7 +7468,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7569,7 +7569,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7606,7 +7606,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7750,7 +7750,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7787,7 +7787,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7921,7 +7921,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7958,7 +7958,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8053,7 +8053,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8090,7 +8090,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8182,7 +8182,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8219,7 +8219,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8311,7 +8311,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8348,7 +8348,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8433,7 +8433,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8461,7 +8461,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8498,7 +8498,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8584,7 +8584,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8611,7 +8611,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8648,7 +8648,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8717,7 +8717,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8821,7 +8821,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8858,7 +8858,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9022,7 +9022,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9048,7 +9048,7 @@ interpret(void) } sz = 0; l171: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9072,7 +9072,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9098,7 +9098,7 @@ interpret(void) } sz = 0; l170: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9693,7 +9693,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9719,7 +9719,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9756,7 +9756,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9836,7 +9836,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9862,7 +9862,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9899,7 +9899,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10000,7 +10000,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10037,7 +10037,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10180,7 +10180,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10217,7 +10217,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10351,7 +10351,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10388,7 +10388,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10483,7 +10483,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10520,7 +10520,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10612,7 +10612,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10649,7 +10649,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10741,7 +10741,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10778,7 +10778,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10863,7 +10863,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10891,7 +10891,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10928,7 +10928,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11014,7 +11014,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11041,7 +11041,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11078,7 +11078,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11147,7 +11147,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11251,7 +11251,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11288,7 +11288,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11430,7 +11430,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11456,7 +11456,7 @@ interpret(void) } sz = 0; l293: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11480,7 +11480,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11506,7 +11506,7 @@ interpret(void) } sz = 0; l292: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11837,7 +11837,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12010,7 +12010,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l327; } if (index == InstructionPointerIndex) { @@ -12179,7 +12179,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } BREAK; CASE(489) /*233*/ @@ -12570,7 +12570,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12638,7 +12638,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12811,7 +12811,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12878,7 +12878,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13064,7 +13064,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13177,10 +13177,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13339,7 +13339,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l400; } if (slotIndex == InstructionPointerIndex) { @@ -13517,7 +13517,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13706,7 +13706,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14153,7 +14153,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14279,7 +14279,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14376,7 +14376,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14389,7 +14389,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15083,7 +15083,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16800,15 +16800,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -17183,7 +17183,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18132,7 +18132,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -18925,7 +18925,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19181,7 +19181,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -19448,7 +19448,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -19514,7 +19514,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -19525,22 +19525,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -20061,11 +20061,11 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -20278,12 +20278,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -20317,7 +20317,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -20824,9 +20824,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -20875,7 +20875,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -21071,7 +21071,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -21309,7 +21309,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21533,7 +21533,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21620,31 +21620,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -21654,66 +21644,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -21735,14 +21672,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -22074,7 +22011,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -22488,7 +22425,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -22660,7 +22597,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -22704,7 +22641,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -22750,7 +22687,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -22970,7 +22907,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -23349,7 +23286,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -23361,7 +23298,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24412,7 +24349,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -24451,7 +24388,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -24492,7 +24429,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -24576,7 +24513,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -24693,7 +24630,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -24851,7 +24788,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -24969,7 +24906,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -25077,7 +25014,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -25122,14 +25059,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -25150,7 +25087,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -25525,7 +25462,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25605,11 +25542,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25619,7 +25556,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -25658,7 +25595,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -25693,7 +25630,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -26174,7 +26111,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -26216,10 +26153,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26227,7 +26164,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26242,28 +26179,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26276,10 +26213,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26287,7 +26224,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26302,28 +26239,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26394,10 +26331,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26405,7 +26342,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26420,28 +26357,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26454,10 +26391,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26465,7 +26402,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26480,28 +26417,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26595,7 +26532,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -26722,10 +26659,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -26733,7 +26670,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26748,28 +26685,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26781,10 +26718,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -26792,7 +26729,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26807,28 +26744,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26912,7 +26849,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -27221,14 +27158,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -27260,7 +27197,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -27279,7 +27216,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -27869,7 +27806,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -28156,7 +28093,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28188,7 +28125,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -28302,7 +28239,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -28379,7 +28316,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -28432,7 +28369,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28468,7 +28405,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -28592,7 +28529,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28655,7 +28592,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28882,7 +28819,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28982,7 +28919,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29019,7 +28956,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29078,7 +29015,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -29092,7 +29029,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -29214,7 +29151,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29251,7 +29188,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29327,7 +29264,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29365,7 +29302,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29436,7 +29373,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29474,7 +29411,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29545,7 +29482,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29583,7 +29520,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29654,7 +29591,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29692,7 +29629,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29763,7 +29700,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29801,7 +29738,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29873,7 +29810,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -29910,7 +29847,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -29978,7 +29915,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30016,7 +29953,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30088,7 +30025,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30125,7 +30062,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30238,7 +30175,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -30278,7 +30215,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -30320,7 +30257,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -30443,7 +30380,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -30532,7 +30469,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30736,7 +30673,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30790,7 +30727,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30994,7 +30931,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31044,7 +30981,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31098,7 +31035,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -31285,7 +31222,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31433,10 +31370,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31454,7 +31391,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -31493,7 +31430,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -31511,7 +31448,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -31644,10 +31581,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31769,7 +31706,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -31791,7 +31728,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -31889,7 +31826,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -31911,7 +31848,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32097,7 +32034,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -32153,7 +32090,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -32192,7 +32129,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -32200,7 +32137,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -32226,6 +32163,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -32234,7 +32172,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32242,10 +32180,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32271,32 +32229,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32336,7 +32294,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -32531,7 +32489,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -32561,7 +32519,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33015,7 +32973,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -33044,7 +33002,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33060,7 +33018,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33077,7 +33035,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33158,7 +33116,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -33246,10 +33204,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33317,7 +33275,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -33645,7 +33603,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33691,7 +33649,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33699,7 +33657,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -33773,7 +33731,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -33815,7 +33773,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33846,7 +33804,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33902,7 +33860,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34103,7 +34061,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -34141,7 +34099,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -34252,7 +34210,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -34279,7 +34237,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -34407,7 +34365,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -34525,7 +34483,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -34776,7 +34734,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35083,7 +35041,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35095,7 +35053,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35144,7 +35102,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35156,7 +35114,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35183,7 +35141,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -35195,7 +35153,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -35230,7 +35188,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35326,10 +35284,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -35348,7 +35306,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -35605,7 +35563,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -35738,7 +35696,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -35780,7 +35738,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -35894,7 +35852,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -35949,7 +35907,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -36132,7 +36090,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -36173,7 +36131,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -36261,7 +36219,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36334,7 +36292,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36350,7 +36308,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36404,7 +36362,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36442,7 +36400,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36458,7 +36416,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36525,7 +36483,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36541,7 +36499,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36605,7 +36563,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -36631,7 +36589,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36669,7 +36627,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36685,7 +36643,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36748,7 +36706,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36764,7 +36722,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36827,7 +36785,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36843,7 +36801,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36906,7 +36864,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -36922,7 +36880,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -36981,7 +36939,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37019,7 +36977,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37035,7 +36993,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37096,7 +37054,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37112,7 +37070,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37168,7 +37126,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37219,7 +37177,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37235,7 +37193,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37337,14 +37295,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -37557,7 +37515,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37637,11 +37595,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37651,7 +37609,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -37697,7 +37655,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37734,7 +37692,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37996,7 +37954,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -38047,7 +38005,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -38166,7 +38124,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38411,7 +38369,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38520,7 +38478,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38560,7 +38518,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38602,7 +38560,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38695,7 +38653,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38750,7 +38708,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38837,7 +38795,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -38868,20 +38826,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -38927,7 +38885,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -38946,14 +38904,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38962,7 +38920,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39112,7 +39070,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39148,7 +39106,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39186,7 +39144,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39383,7 +39341,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39738,7 +39696,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -39830,7 +39788,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -39967,7 +39925,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40050,7 +40008,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -40142,7 +40100,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40381,9 +40339,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -40463,7 +40421,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -40532,7 +40490,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40577,7 +40535,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -40710,7 +40668,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40748,7 +40706,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -40809,7 +40767,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -41208,7 +41166,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -41265,9 +41223,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -41802,7 +41760,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -41975,7 +41933,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -42247,7 +42205,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42288,7 +42246,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42318,7 +42276,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -42720,7 +42678,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -42762,7 +42720,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -42817,7 +42775,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -42865,7 +42823,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -42929,7 +42887,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -42990,7 +42948,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -43044,7 +43002,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -43099,7 +43057,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -43238,7 +43196,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -43275,7 +43233,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -43328,7 +43286,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43374,7 +43332,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -43412,7 +43370,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -43500,7 +43458,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -43538,7 +43496,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43578,7 +43536,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43635,7 +43593,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44538,7 +44496,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -44711,7 +44669,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44771,7 +44729,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44864,7 +44822,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45074,7 +45032,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45188,7 +45146,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45354,7 +45312,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45737,7 +45695,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46116,7 +46074,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46158,7 +46116,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -46244,7 +46202,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -46394,7 +46352,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -46623,7 +46581,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46670,7 +46628,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46719,7 +46677,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46965,7 +46923,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -47099,7 +47057,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -47158,7 +47116,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -47231,7 +47189,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -47311,7 +47269,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47697,7 +47655,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47735,7 +47693,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47981,7 +47939,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48029,7 +47987,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48079,7 +48037,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48174,7 +48132,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48219,7 +48177,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48266,7 +48224,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48978,7 +48936,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49008,14 +48966,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -49046,7 +49004,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -49098,7 +49056,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49201,7 +49159,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -49218,7 +49176,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49527,7 +49485,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49565,7 +49523,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49605,7 +49563,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49715,9 +49673,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -49880,9 +49838,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -51034,7 +50992,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51074,7 +51032,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -51213,7 +51171,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -51231,7 +51189,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51253,7 +51211,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51289,7 +51247,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -51359,7 +51317,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -51441,7 +51399,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51467,7 +51425,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -51561,7 +51519,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -51701,7 +51659,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51746,7 +51704,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51784,7 +51742,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51878,9 +51836,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -51906,7 +51864,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51948,9 +51906,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -51976,7 +51934,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52019,9 +51977,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -52048,7 +52006,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -52158,9 +52116,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -52279,7 +52237,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -52496,7 +52454,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -52610,7 +52568,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -52676,7 +52634,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -53162,7 +53120,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -53220,7 +53178,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -53257,7 +53215,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53750,7 +53708,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -53817,7 +53775,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -53885,7 +53843,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -53928,7 +53886,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53964,7 +53922,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -54024,9 +53982,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -54064,7 +54022,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54078,7 +54036,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -54110,7 +54068,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -54217,7 +54175,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54239,7 +54197,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -54262,7 +54220,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -54283,7 +54241,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -54361,7 +54319,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -54398,7 +54356,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54438,7 +54396,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55002,7 +54960,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55048,7 +55006,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55096,7 +55054,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55198,7 +55156,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55251,7 +55209,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55306,7 +55264,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55379,7 +55337,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55424,7 +55382,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55462,7 +55420,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55553,7 +55511,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55596,7 +55554,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55634,7 +55592,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55810,13 +55768,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -55825,9 +55783,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -55986,7 +55944,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56031,7 +55989,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56069,7 +56027,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56216,7 +56174,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56267,7 +56225,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56320,7 +56278,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56419,7 +56377,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56464,7 +56422,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56502,7 +56460,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56633,7 +56591,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -56741,9 +56699,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -56790,7 +56748,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56841,9 +56799,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -56890,7 +56848,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56942,9 +56900,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -56992,7 +56950,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -57676,7 +57634,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -57882,7 +57840,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -57976,7 +57934,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -58030,7 +57988,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -58077,7 +58035,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -58114,7 +58072,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58237,9 +58195,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -58248,9 +58206,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -58287,7 +58245,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -58936,7 +58894,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58957,7 +58915,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -59267,7 +59225,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -59372,7 +59330,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -59495,7 +59453,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -59555,7 +59513,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -59673,8 +59631,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -60061,7 +60019,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -60097,7 +60055,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -60135,7 +60093,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -60528,7 +60486,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -61149,7 +61107,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61647,7 +61605,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -61713,7 +61671,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -61781,7 +61739,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61835,7 +61793,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61875,7 +61833,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61917,7 +61875,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -62298,7 +62256,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -62445,7 +62403,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -62544,7 +62502,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -62809,7 +62767,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -63880,7 +63838,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -64190,7 +64148,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -64205,7 +64163,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -64345,7 +64303,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -64450,7 +64408,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -64483,7 +64441,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -64618,7 +64576,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -64788,7 +64746,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -64955,7 +64913,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65110,7 +65068,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -65281,10 +65239,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -65723,7 +65681,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -66026,7 +65984,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -66225,7 +66183,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -66350,7 +66308,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -66564,7 +66522,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -66610,7 +66568,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -66655,7 +66613,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -66693,7 +66651,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -67295,7 +67253,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -67606,7 +67564,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -67843,7 +67801,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -68082,7 +68040,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -68199,7 +68157,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -68556,7 +68514,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -68589,7 +68547,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -69066,7 +69024,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -69093,11 +69051,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -70016,6 +69974,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -70029,13 +69988,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70291,7 +70255,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -70434,7 +70398,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70538,7 +70502,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70592,8 +70556,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70603,7 +70567,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70626,8 +70590,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -71065,7 +71029,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -71084,16 +71048,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -71107,25 +71071,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -71133,7 +71097,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -71194,7 +71158,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71272,10 +71236,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -71283,7 +71247,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -71314,14 +71278,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71474,7 +71438,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -71605,7 +71569,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -71842,9 +71806,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -72012,7 +71976,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -72282,7 +72246,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -72362,11 +72326,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72376,7 +72340,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -72412,7 +72376,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72471,11 +72435,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72485,7 +72449,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -72556,8 +72520,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -72578,7 +72542,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -72745,7 +72709,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72916,7 +72880,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72991,7 +72955,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -73091,7 +73055,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -73160,7 +73124,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -73203,7 +73167,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -73371,7 +73335,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -73425,7 +73389,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73435,7 +73399,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73494,7 +73458,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -73787,7 +73751,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -73824,7 +73788,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -73869,12 +73833,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -74110,7 +74074,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -74119,7 +74083,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -74159,7 +74123,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -74199,7 +74163,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74255,11 +74219,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74269,7 +74233,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -74296,7 +74260,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -74328,7 +74292,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74580,7 +74544,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -74954,9 +74918,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -74971,7 +74935,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -74998,9 +74962,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -75009,9 +74973,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -75020,7 +74984,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -75032,10 +74996,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -75081,7 +75045,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -75113,9 +75077,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75184,7 +75148,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75192,7 +75156,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75211,7 +75175,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75219,7 +75183,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75230,12 +75194,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75247,7 +75211,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75258,12 +75222,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75381,7 +75345,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -75566,17 +75530,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75585,7 +75549,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -75612,80 +75576,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -75695,7 +75659,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75705,15 +75669,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75835,17 +75799,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75869,15 +75833,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -75921,22 +75885,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -75948,43 +75912,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -75992,37 +75956,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -76031,7 +75995,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76040,14 +76004,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -76082,15 +76046,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -76100,13 +76064,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -76159,7 +76123,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -76170,13 +76134,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -76185,7 +76149,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76196,7 +76160,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76205,7 +76169,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76213,7 +76177,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76222,7 +76186,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76230,7 +76194,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76253,7 +76217,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -76474,7 +76438,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -76528,7 +76492,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -76575,7 +76539,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spur64src/vm/vmCallback.h b/spur64src/vm/vmCallback.h index f5c9e05d68..6c4fdfda5e 100644 --- a/spur64src/vm/vmCallback.h +++ b/spur64src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/spursista64src/vm/cogit.h b/spursista64src/vm/cogit.h index 6bc529b6a2..c3ecf1d543 100644 --- a/spursista64src/vm/cogit.h +++ b/spursista64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -120,15 +120,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/spursista64src/vm/cogitX64.c b/spursista64src/vm/cogitX64.c index 6c82bab62c..40310d1af9 100644 --- a/spursista64src/vm/cogitX64.c +++ b/spursista64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + SistaCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -320,8 +320,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -437,7 +437,7 @@ static AbstractInstruction * NoDbgRegParms initializeSharableLiteral(AbstractIns static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal); static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); @@ -618,7 +618,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -953,7 +953,7 @@ static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_ static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -1108,7 +1108,7 @@ extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); static sqInt maybeAllocAndInitCounters(void); static usqInt NoDbgRegParms picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod); -static sqInt NoDbgRegParms picDataForCounterat(unsigned long counter, sqInt bcpc); +static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc); static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClassOrNil, char *sendMcpc, sqInt sendBcpc); static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); @@ -1277,7 +1277,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; static sqInt ceDereferenceSelectorIndex; @@ -1286,9 +1286,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1320,7 +1320,7 @@ static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; static sqInt ceTrapTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1340,7 +1340,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1896,7 +1896,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1961,10 +1961,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2203,7 +2203,7 @@ isJump(AbstractInstruction * self_in_isJump) compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2348,9 +2348,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - unsigned long reg; + usqIntptr_t reg; sqInt reverse; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2385,9 +2385,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - unsigned long offset; - unsigned long reg; - unsigned long value; + usqIntptr_t offset; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2507,9 +2507,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -2905,7 +2905,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3914,7 +3914,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -4146,9 +4146,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4394,7 +4394,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 3) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4829,8 +4829,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -4875,8 +4875,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -4946,7 +4946,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt jumpTargetAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -5860,8 +5860,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5931,7 +5931,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5940,7 +5940,7 @@ generateClosedPICPrototype(void) sqInt literal; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; @@ -6028,7 +6028,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6077,7 +6077,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6174,14 +6174,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6239,9 +6239,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6333,9 +6333,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6371,8 +6371,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -6392,7 +6392,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6406,7 +6406,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -7218,7 +7218,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -8172,7 +8172,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -11758,7 +11758,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -12882,7 +12882,7 @@ genPrimitiveAtPut(void) /* begin JumpBelow: */ jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((sqInt)0xFFFFFFFFU << 3) | 1); + quickConstant6 = (((usqInt)0xFFFFFFFFU << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(CmpCqR, quickConstant6, Arg1Reg); /* begin JumpAbove: */ @@ -12910,7 +12910,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR((((sqInt)0xFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -12941,7 +12941,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR((((sqInt)0xFFFF << 3) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 3) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -13368,7 +13368,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = (((maxSlots * 2) << 3) | 1); + quickConstant6 = (((usqInt)(maxSlots * 2) << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -13398,7 +13398,7 @@ genPrimitiveNewWithArg(void) anInstruction9 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -13424,7 +13424,7 @@ genPrimitiveNewWithArg(void) anInstruction13 = genoperandoperand(MoveCqR, 0, fillReg); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 3) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 3) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -14473,7 +14473,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant1 = ((numArgs << 3) | 1); + quickConstant1 = (((usqInt)numArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant1, TempReg); /* begin MoveR:Mw:r: */ @@ -15530,13 +15530,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction6 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant1 = ((bcpc << 3) | 1); + quickConstant1 = (((usqInt)bcpc << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant1, TempReg); /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant2 = ((numArgs << 3) | 1); + quickConstant2 = (((usqInt)numArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant2, TempReg); /* begin MoveR:Mw:r: */ @@ -15662,7 +15662,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = (((sqInt)1 << 3) | 1); + quickConstant = (((usqInt)1 << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -15673,9 +15673,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 3) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = ((((sqInt)1 << 3) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 3) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -15691,7 +15691,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR(((((sqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 3) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -17233,7 +17233,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -17259,8 +17259,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - unsigned long reg; - unsigned long value; + usqIntptr_t reg; + usqIntptr_t value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -17297,7 +17297,7 @@ concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithC static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -17311,10 +17311,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - unsigned long base; - unsigned long index; + usqIntptr_t base; + usqIntptr_t index; sqInt offset; - unsigned long src; + usqIntptr_t src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -17348,9 +17348,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - unsigned long base; - unsigned long dest; - unsigned long index; + usqIntptr_t base; + usqIntptr_t dest; + usqIntptr_t index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -17385,8 +17385,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -17405,8 +17405,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long offset; - unsigned long operand; + usqIntptr_t offset; + usqIntptr_t operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -17433,8 +17433,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -17448,8 +17448,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - unsigned long r1; - unsigned long r2; + usqIntptr_t r1; + usqIntptr_t r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -17478,47 +17478,47 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long addressOperand5; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t addressOperand5; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; - unsigned long distance; - unsigned long distance1; - unsigned long distance2; - unsigned long distance3; - unsigned long distance4; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; + usqIntptr_t distance; + usqIntptr_t distance1; + usqIntptr_t distance2; + usqIntptr_t distance3; + usqIntptr_t distance4; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -17586,13 +17586,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; - unsigned long offset110; - unsigned long offset111; - unsigned long offset112; - unsigned long offset113; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; + usqIntptr_t offset110; + usqIntptr_t offset111; + usqIntptr_t offset112; + usqIntptr_t offset113; sqInt offset114; sqInt offset115; sqInt offset116; @@ -17611,13 +17611,13 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset128; sqInt offset129; sqInt offset13; - unsigned long offset14; - unsigned long offset15; + usqIntptr_t offset14; + usqIntptr_t offset15; sqInt offset16; sqInt offset17; - unsigned long offset18; - unsigned long offset19; - unsigned long offset2; + usqIntptr_t offset18; + usqIntptr_t offset19; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -17628,7 +17628,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -17639,91 +17639,91 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; sqInt offset9; - unsigned long operand; - unsigned long operand1; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regDivisor; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regToShift; - unsigned long regToShift1; - unsigned long save0; - unsigned long save01; - unsigned long save1; - unsigned long save11; - unsigned long save12; - unsigned long save13; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; + usqIntptr_t operand; + usqIntptr_t operand1; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regDivisor; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; + usqIntptr_t save0; + usqIntptr_t save01; + usqIntptr_t save1; + usqIntptr_t save11; + usqIntptr_t save12; + usqIntptr_t save13; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip2; sqInt skip3; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; - unsigned long value; - unsigned long value1; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long word; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t word; switch ((self_in_dispatchConcretize->opcode)) { @@ -20826,7 +20826,7 @@ isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc) /* CogX64Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((sqLong) operand)) >= -128) && ((((sqLong) operand)) <= 0x7F)); } @@ -21117,12 +21117,13 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -21685,7 +21686,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -21700,7 +21701,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -22190,7 +22191,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 3) | 1)); + return genPushLiteral((((usqInt)value << 3) | 1)); } @@ -22675,7 +22676,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -22721,7 +22722,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral((((sqInt)1 << 3) | 1)); + return genPushLiteral((((usqInt)1 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -22738,7 +22739,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral((((sqInt)0 << 3) | 1)); + return genPushLiteral((((usqInt)0 << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -22782,7 +22783,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 3) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 3) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -23155,7 +23156,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23177,15 +23178,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } return 4; } @@ -23408,9 +23409,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 3) | 1)); introspectionDataIndex += 4; return 0; } @@ -23428,17 +23429,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 3) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 3) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 3) | 1)); introspectionDataIndex += 6; return 0; @@ -23448,7 +23449,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); introspectionDataIndex += 2; } @@ -24040,7 +24041,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -24398,12 +24399,12 @@ compileBlockBodies(void) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -24466,13 +24467,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -27088,9 +27089,9 @@ getJumpTargetPCAt(sqInt pc) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initialCounterValue = MaxCounterValue; @@ -27120,7 +27121,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -27180,7 +27181,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -27340,13 +27341,18 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) return ((sqInt) 0); } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataForCounter:at: */ static sqInt NoDbgRegParms -picDataForCounterat(unsigned long counter, sqInt bcpc) +picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned long executedCount; + sqInt executedCount; sqInt tuple; - unsigned long untakenCount; + sqInt untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -27355,9 +27361,9 @@ picDataForCounterat(unsigned long counter, sqInt bcpc) assert(CounterBytes == 4); executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); - storePointerUncheckedofObjectwithValue(0, tuple, ((bcpc << 3) | 1)); - storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 3) | 1)); - storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 3) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(1, tuple, (((usqInt)executedCount << 3) | 1)); + storePointerUncheckedofObjectwithValue(2, tuple, (((usqInt)untakenCount << 3) | 1)); return tuple; } @@ -27384,7 +27390,7 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass if (tuple == 0) { return 0; } - storePointerUncheckedofObjectwithValue(0, tuple, ((sendBcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)sendBcpc << 3) | 1)); if (((cogMethod->cmType)) == CMMethod) { class = (!(methodClassOrNil) ? classForInlineCacheTag(inlineCacheTagAt(backEnd, ((usqInt)sendMcpc))) @@ -27406,13 +27412,18 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass return 0; } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataFor:Annotation:Mcpc:Bcpc:Method: */ static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt annotation; sqInt association; - unsigned long counter; + unsigned int counter; sqInt entryPoint; sqInt methodClassIfSuper; sqInt sendTable; @@ -27429,7 +27440,7 @@ picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackw /* it's a branch; conditional? */ if (((descriptor->isBranchTrue)) || ((descriptor->isBranchFalse))) { - counter = (((unsigned long *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; + counter = (((usqInt *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; tuple = picDataForCounterat(counter, bcpc + 1); if (tuple == 0) { return PrimErrNoMemory; @@ -27503,7 +27514,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -29312,7 +29323,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 3) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -29387,7 +29398,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 3) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 3) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -29946,7 +29957,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 3) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 3) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursista64src/vm/cointerp.c b/spursista64src/vm/cointerp.c index 03210f3a3d..b347571b16 100644 --- a/spursista64src/vm/cointerp.c +++ b/spursista64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -550,7 +550,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -649,7 +649,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -865,7 +865,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1461,7 +1461,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1510,7 +1510,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1555,8 +1555,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1780,7 +1780,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1788,12 +1788,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1836,7 +1836,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2457,7 +2457,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2592,7 +2592,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4494,7 +4494,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5485,7 +5485,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5551,7 +5551,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5617,7 +5617,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5683,7 +5683,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5923,7 +5923,7 @@ interpret(void) l489: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5949,7 +5949,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l491; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l491: /* end internalQuickPrimitiveResponse */; goto l488; } @@ -6089,7 +6089,7 @@ interpret(void) goto l483; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l483: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6259,7 +6259,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6333,7 +6333,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6471,7 +6471,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6789,7 +6789,7 @@ interpret(void) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); result = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); longAtPointerput(localSP, ((result << 3) | 1)); break; @@ -6806,7 +6806,7 @@ interpret(void) assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(objOop1 + 7); numBytes = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -6901,37 +6901,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -6948,28 +6948,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -7032,13 +7032,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 3)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 2)))); @@ -7299,10 +7299,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7656,7 +7656,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7682,7 +7682,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7719,7 +7719,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7799,7 +7799,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7825,7 +7825,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7862,7 +7862,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7963,7 +7963,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8000,7 +8000,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8144,7 +8144,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8181,7 +8181,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8315,7 +8315,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8352,7 +8352,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8447,7 +8447,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8484,7 +8484,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8576,7 +8576,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8613,7 +8613,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8705,7 +8705,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8742,7 +8742,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8827,7 +8827,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8855,7 +8855,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8892,7 +8892,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8978,7 +8978,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9005,7 +9005,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9042,7 +9042,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9111,7 +9111,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9215,7 +9215,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -9252,7 +9252,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9416,7 +9416,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9442,7 +9442,7 @@ interpret(void) } sz = 0; l181: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9466,7 +9466,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9492,7 +9492,7 @@ interpret(void) } sz = 0; l180: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10087,7 +10087,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10113,7 +10113,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10150,7 +10150,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10230,7 +10230,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10256,7 +10256,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10293,7 +10293,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10394,7 +10394,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10431,7 +10431,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10574,7 +10574,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10611,7 +10611,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10745,7 +10745,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10782,7 +10782,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10877,7 +10877,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10914,7 +10914,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11006,7 +11006,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11043,7 +11043,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11135,7 +11135,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11172,7 +11172,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11257,7 +11257,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -11285,7 +11285,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11322,7 +11322,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11408,7 +11408,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11435,7 +11435,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11472,7 +11472,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11541,7 +11541,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11645,7 +11645,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11682,7 +11682,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11824,7 +11824,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11850,7 +11850,7 @@ interpret(void) } sz = 0; l303: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11874,7 +11874,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11900,7 +11900,7 @@ interpret(void) } sz = 0; l302: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12231,7 +12231,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12426,7 +12426,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l337; } if (index == InstructionPointerIndex) { @@ -12595,7 +12595,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } break; case 489: /*233*/ @@ -12986,7 +12986,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13054,7 +13054,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13227,7 +13227,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13294,7 +13294,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13428,7 +13428,7 @@ interpret(void) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); result = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); longAtPointerput(localSP, ((result << 3) | 1)); break; @@ -13445,7 +13445,7 @@ interpret(void) assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(objOop1 + 7); numBytes = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -13540,37 +13540,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -13587,28 +13587,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -13671,13 +13671,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 3)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 2)))); @@ -13874,7 +13874,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13987,10 +13987,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -14149,7 +14149,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l420; } if (slotIndex == InstructionPointerIndex) { @@ -14327,7 +14327,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14516,7 +14516,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14960,7 +14960,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15086,7 +15086,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15183,7 +15183,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -15196,7 +15196,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15890,7 +15890,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -17551,7 +17551,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17791,15 +17791,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -18174,7 +18174,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -19123,7 +19123,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19916,7 +19916,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -20172,7 +20172,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -20439,7 +20439,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -20505,7 +20505,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -20516,22 +20516,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -21052,7 +21052,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -21269,12 +21269,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21308,7 +21308,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21815,9 +21815,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -21866,7 +21866,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22062,7 +22062,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22300,7 +22300,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22524,7 +22524,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22611,31 +22611,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -22645,66 +22635,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22726,14 +22663,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23065,7 +23002,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -23479,7 +23416,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -23651,7 +23588,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -23695,7 +23632,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -23741,7 +23678,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23988,7 +23925,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24367,7 +24304,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24379,7 +24316,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25501,7 +25438,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -25540,7 +25477,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -25581,7 +25518,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -25665,7 +25602,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -25782,7 +25719,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25940,7 +25877,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -26058,7 +25995,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26166,7 +26103,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26211,14 +26148,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26239,7 +26176,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -26614,7 +26551,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -26694,11 +26631,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26708,7 +26645,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -26747,7 +26684,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -26782,7 +26719,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -27263,7 +27200,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27305,10 +27242,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27316,7 +27253,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27331,28 +27268,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27365,10 +27302,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27376,7 +27313,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27391,28 +27328,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27483,10 +27420,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27494,7 +27431,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27509,28 +27446,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27543,10 +27480,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27554,7 +27491,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27569,28 +27506,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27684,7 +27621,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -27811,10 +27748,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27822,7 +27759,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27837,28 +27774,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27870,10 +27807,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27881,7 +27818,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27896,28 +27833,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28001,7 +27938,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -28310,14 +28247,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -28349,7 +28286,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28368,7 +28305,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -28958,7 +28895,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -29245,7 +29182,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29277,7 +29214,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -29391,7 +29328,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29468,7 +29405,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -29521,7 +29458,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29557,7 +29494,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -29681,7 +29618,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -29744,7 +29681,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -29971,7 +29908,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30071,7 +30008,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30108,7 +30045,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30167,7 +30104,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -30181,7 +30118,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -30303,7 +30240,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30340,7 +30277,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30416,7 +30353,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30454,7 +30391,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30525,7 +30462,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30563,7 +30500,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30634,7 +30571,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30672,7 +30609,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30743,7 +30680,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30781,7 +30718,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30852,7 +30789,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30890,7 +30827,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30962,7 +30899,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30999,7 +30936,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31067,7 +31004,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31105,7 +31042,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31177,7 +31114,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31214,7 +31151,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31327,7 +31264,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -31367,7 +31304,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -31409,7 +31346,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -31532,7 +31469,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -31621,7 +31558,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31825,7 +31762,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31879,7 +31816,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -32083,7 +32020,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32133,7 +32070,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -32187,7 +32124,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -32374,7 +32311,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32522,10 +32459,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -32543,7 +32480,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32582,7 +32519,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32600,7 +32537,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -32733,10 +32670,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32858,7 +32795,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32880,7 +32817,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32978,7 +32915,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -33000,7 +32937,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -33089,7 +33026,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -33115,7 +33052,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -33186,7 +33123,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -33242,7 +33179,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -33281,7 +33218,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33289,7 +33226,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -33315,6 +33252,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -33323,7 +33261,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -33331,10 +33269,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -33360,32 +33318,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -33425,7 +33383,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33620,7 +33578,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33650,7 +33608,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -34104,7 +34062,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -34133,7 +34091,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -34149,7 +34107,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -34166,7 +34124,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34247,7 +34205,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -34335,10 +34293,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -34406,7 +34364,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -34734,7 +34692,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34780,7 +34738,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34788,7 +34746,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34862,7 +34820,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -34904,7 +34862,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34935,7 +34893,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -34991,7 +34949,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35192,7 +35150,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -35230,7 +35188,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -35341,7 +35299,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35368,7 +35326,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -35496,7 +35454,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35614,7 +35572,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35865,7 +35823,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -36172,7 +36130,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36184,7 +36142,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36233,7 +36191,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36245,7 +36203,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36272,7 +36230,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36284,7 +36242,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36319,7 +36277,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -36415,10 +36373,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36437,7 +36395,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -36694,7 +36652,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36827,7 +36785,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -36869,7 +36827,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36983,7 +36941,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -37038,7 +36996,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -37221,7 +37179,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37262,7 +37220,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -37350,7 +37308,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37423,7 +37381,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37439,7 +37397,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37493,7 +37451,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37531,7 +37489,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37547,7 +37505,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37614,7 +37572,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37630,7 +37588,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37694,7 +37652,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -37720,7 +37678,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37758,7 +37716,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37774,7 +37732,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37837,7 +37795,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37853,7 +37811,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37916,7 +37874,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37932,7 +37890,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37995,7 +37953,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38011,7 +37969,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38070,7 +38028,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38108,7 +38066,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38124,7 +38082,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38185,7 +38143,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38201,7 +38159,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38257,7 +38215,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38308,7 +38266,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38324,7 +38282,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38426,14 +38384,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38646,7 +38604,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38726,11 +38684,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -38740,7 +38698,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -38786,7 +38744,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -38823,7 +38781,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -39085,7 +39043,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -39136,7 +39094,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -39255,7 +39213,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39500,7 +39458,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39609,7 +39567,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39649,7 +39607,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39691,7 +39649,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39784,7 +39742,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39839,7 +39797,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39926,7 +39884,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -39957,20 +39915,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -40016,7 +39974,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -40035,14 +39993,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -40051,7 +40009,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -40201,7 +40159,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -40237,7 +40195,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -40275,7 +40233,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -40472,7 +40430,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40827,7 +40785,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -40859,7 +40817,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - sqInt newFormat; + usqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40919,7 +40877,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -41028,7 +40986,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); return 0; } @@ -41056,7 +41014,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41139,7 +41097,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -41231,7 +41189,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41470,9 +41428,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -41552,7 +41510,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41621,7 +41579,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41666,7 +41624,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41799,7 +41757,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41837,7 +41795,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -41898,7 +41856,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42297,7 +42255,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -42354,9 +42312,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -42891,7 +42849,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43064,7 +43022,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -43336,7 +43294,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43377,7 +43335,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43407,7 +43365,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43809,7 +43767,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43851,7 +43809,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -43906,7 +43864,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43954,7 +43912,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44018,7 +43976,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -44079,7 +44037,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -44133,7 +44091,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -44188,7 +44146,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -44327,7 +44285,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44364,7 +44322,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -44417,7 +44375,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44463,7 +44421,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44501,7 +44459,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -44589,7 +44547,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44627,7 +44585,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44667,7 +44625,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44724,7 +44682,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -45627,7 +45585,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -45800,7 +45758,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45860,7 +45818,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45953,7 +45911,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46163,7 +46121,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46277,7 +46235,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46443,7 +46401,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46826,7 +46784,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47205,7 +47163,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47247,7 +47205,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -47333,7 +47291,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -47483,7 +47441,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47712,7 +47670,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47759,7 +47717,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47808,7 +47766,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48054,7 +48012,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -48188,7 +48146,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -48247,7 +48205,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -48320,7 +48278,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48400,7 +48358,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48786,7 +48744,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48824,7 +48782,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49070,7 +49028,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49118,7 +49076,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49168,7 +49126,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49263,7 +49221,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49308,7 +49266,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49355,7 +49313,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50075,7 +50033,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50105,14 +50063,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -50143,7 +50101,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -50195,7 +50153,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -50298,7 +50256,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -50315,7 +50273,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50624,7 +50582,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50662,7 +50620,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50702,7 +50660,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50812,9 +50770,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -50977,9 +50935,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -52131,7 +52089,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52171,7 +52129,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52310,7 +52268,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -52328,7 +52286,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52350,7 +52308,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52386,7 +52344,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -52456,7 +52414,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -52538,7 +52496,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52564,7 +52522,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -52658,7 +52616,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -52798,7 +52756,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52843,7 +52801,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52881,7 +52839,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52975,9 +52933,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53003,7 +52961,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -53045,9 +53003,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53073,7 +53031,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53116,9 +53074,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53145,7 +53103,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -53255,9 +53213,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -53376,7 +53334,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -53593,7 +53551,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -53707,7 +53665,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -53773,7 +53731,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -54317,7 +54275,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54354,7 +54312,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54847,7 +54805,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54914,7 +54872,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -54982,7 +54940,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55025,7 +54983,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55061,7 +55019,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55121,9 +55079,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -55161,7 +55119,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -55175,7 +55133,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -55207,7 +55165,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -55314,7 +55272,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -55336,7 +55294,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -55359,7 +55317,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -55380,7 +55338,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -55458,7 +55416,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55495,7 +55453,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55535,7 +55493,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56099,7 +56057,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56145,7 +56103,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56193,7 +56151,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56295,7 +56253,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56348,7 +56306,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56403,7 +56361,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56476,7 +56434,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56521,7 +56479,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56559,7 +56517,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56650,7 +56608,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56693,7 +56651,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56731,7 +56689,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56907,13 +56865,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -56922,9 +56880,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -57083,7 +57041,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57128,7 +57086,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57166,7 +57124,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57313,7 +57271,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57364,7 +57322,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57417,7 +57375,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57516,7 +57474,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57561,7 +57519,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57599,7 +57557,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57730,7 +57688,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57838,9 +57796,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -57887,7 +57845,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57938,9 +57896,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -57987,7 +57945,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58039,9 +57997,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -58089,7 +58047,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -58773,7 +58731,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -58979,7 +58937,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -59073,7 +59031,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -59127,7 +59085,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -59174,7 +59132,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -59211,7 +59169,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -59334,9 +59292,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -59345,9 +59303,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -59384,7 +59342,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -60033,7 +59991,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -60054,7 +60012,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -60469,7 +60427,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -60592,7 +60550,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -60652,7 +60610,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -60770,8 +60728,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -61158,7 +61116,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61194,7 +61152,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61232,7 +61190,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61625,7 +61583,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -62246,7 +62204,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -62744,7 +62702,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -62810,7 +62768,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -62878,7 +62836,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -62932,7 +62890,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -62972,7 +62930,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -63014,7 +62972,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -63395,7 +63353,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -63542,7 +63500,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63641,7 +63599,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -63906,7 +63864,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -64998,7 +64956,7 @@ isOptimizedMethod(sqInt methodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -65308,7 +65266,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -65323,7 +65281,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -65463,7 +65421,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -65568,7 +65526,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -65601,7 +65559,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65736,7 +65694,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65906,7 +65864,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66073,7 +66031,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66228,7 +66186,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -66399,10 +66357,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -66841,7 +66799,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -67144,7 +67102,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -67343,7 +67301,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -67468,7 +67426,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -67682,7 +67640,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -67728,7 +67686,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -67773,7 +67731,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -67811,7 +67769,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -68413,7 +68371,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68724,7 +68682,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -68961,7 +68919,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69200,7 +69158,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -69317,7 +69275,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -69674,7 +69632,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -69707,7 +69665,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -70184,7 +70142,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -70211,11 +70169,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -71134,6 +71092,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -71147,13 +71106,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -71409,7 +71373,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -71552,7 +71516,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -71656,7 +71620,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -71710,8 +71674,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -71721,7 +71685,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -71744,8 +71708,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -72183,7 +72147,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -72202,16 +72166,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -72225,25 +72189,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -72251,7 +72215,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -72312,7 +72276,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72390,10 +72354,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -72401,7 +72365,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -72432,14 +72396,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72592,7 +72556,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -72723,7 +72687,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72960,9 +72924,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -73130,7 +73094,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -73400,7 +73364,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -73480,11 +73444,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -73494,7 +73458,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -73530,7 +73494,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73589,11 +73553,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -73603,7 +73567,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -73674,8 +73638,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -73696,7 +73660,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -73863,7 +73827,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74034,7 +73998,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74109,7 +74073,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -74209,7 +74173,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -74278,7 +74242,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -74321,7 +74285,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -74489,7 +74453,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -74543,7 +74507,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -74553,7 +74517,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -74612,7 +74576,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -74905,7 +74869,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -74942,7 +74906,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -74987,12 +74951,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -75228,7 +75192,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -75237,7 +75201,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -75277,7 +75241,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -75317,7 +75281,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75373,11 +75337,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -75387,7 +75351,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -75414,7 +75378,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -75446,7 +75410,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75698,7 +75662,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -76072,9 +76036,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -76089,7 +76053,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -76116,9 +76080,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -76127,9 +76091,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -76138,7 +76102,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -76150,10 +76114,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -76199,7 +76163,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -76231,9 +76195,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -76302,7 +76266,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -76310,7 +76274,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -76329,7 +76293,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -76337,7 +76301,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76348,12 +76312,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76365,7 +76329,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76376,12 +76340,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76499,7 +76463,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -76684,17 +76648,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76703,7 +76667,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -76730,80 +76694,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -76813,7 +76777,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76823,15 +76787,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76953,17 +76917,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76987,15 +76951,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -77039,22 +77003,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -77066,43 +77030,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -77110,37 +77074,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -77149,7 +77113,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77158,14 +77122,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -77200,15 +77164,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -77218,13 +77182,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -77277,7 +77241,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -77288,13 +77252,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -77303,7 +77267,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -77314,7 +77278,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77323,7 +77287,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77331,7 +77295,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77340,7 +77304,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77348,7 +77312,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77371,7 +77335,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -77592,7 +77556,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -77646,7 +77610,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -77693,7 +77657,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spursista64src/vm/cointerp.h b/spursista64src/vm/cointerp.h index 9ae4ddd542..b480273e5b 100644 --- a/spursista64src/vm/cointerp.h +++ b/spursista64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -84,7 +84,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -329,8 +329,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -354,7 +354,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/spursista64src/vm/gcc3x-cointerp.c b/spursista64src/vm/gcc3x-cointerp.c index 65b588073b..bc3710b0cc 100644 --- a/spursista64src/vm/gcc3x-cointerp.c +++ b/spursista64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -553,7 +553,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -652,7 +652,7 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -868,7 +868,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1464,7 +1464,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1513,7 +1513,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1558,8 +1558,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1783,7 +1783,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1791,12 +1791,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1839,7 +1839,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2460,7 +2460,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2595,7 +2595,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4503,7 +4503,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5494,7 +5494,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5560,7 +5560,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5626,7 +5626,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5692,7 +5692,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5932,7 +5932,7 @@ interpret(void) l489: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5958,7 +5958,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l491; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l491: /* end internalQuickPrimitiveResponse */; goto l488; } @@ -6098,7 +6098,7 @@ interpret(void) goto l483; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l483: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6268,7 +6268,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6342,7 +6342,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6480,7 +6480,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6798,7 +6798,7 @@ interpret(void) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); result = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); longAtPointerput(localSP, ((result << 3) | 1)); break; @@ -6815,7 +6815,7 @@ interpret(void) assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(objOop1 + 7); numBytes = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -6910,37 +6910,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -6957,28 +6957,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -7041,13 +7041,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 3)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 2)))); @@ -7308,10 +7308,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7665,7 +7665,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7691,7 +7691,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7728,7 +7728,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7808,7 +7808,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7834,7 +7834,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7871,7 +7871,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7972,7 +7972,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8009,7 +8009,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8153,7 +8153,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8190,7 +8190,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8324,7 +8324,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8361,7 +8361,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8456,7 +8456,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8493,7 +8493,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8585,7 +8585,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8622,7 +8622,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8714,7 +8714,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8751,7 +8751,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8836,7 +8836,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8864,7 +8864,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8901,7 +8901,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8987,7 +8987,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9014,7 +9014,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9051,7 +9051,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9120,7 +9120,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9224,7 +9224,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -9261,7 +9261,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9425,7 +9425,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9451,7 +9451,7 @@ interpret(void) } sz = 0; l181: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9475,7 +9475,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9501,7 +9501,7 @@ interpret(void) } sz = 0; l180: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10096,7 +10096,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10122,7 +10122,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10159,7 +10159,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10239,7 +10239,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10265,7 +10265,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10302,7 +10302,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10403,7 +10403,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10440,7 +10440,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10583,7 +10583,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10620,7 +10620,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10754,7 +10754,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10791,7 +10791,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10886,7 +10886,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10923,7 +10923,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11015,7 +11015,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11052,7 +11052,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11144,7 +11144,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11181,7 +11181,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11266,7 +11266,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -11294,7 +11294,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11331,7 +11331,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11417,7 +11417,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11444,7 +11444,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11481,7 +11481,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11550,7 +11550,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11654,7 +11654,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11691,7 +11691,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11833,7 +11833,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -11859,7 +11859,7 @@ interpret(void) } sz = 0; l303: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11883,7 +11883,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -11909,7 +11909,7 @@ interpret(void) } sz = 0; l302: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12240,7 +12240,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12435,7 +12435,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l337; } if (index == InstructionPointerIndex) { @@ -12604,7 +12604,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } BREAK; CASE(489) /*233*/ @@ -12995,7 +12995,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13063,7 +13063,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13236,7 +13236,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13303,7 +13303,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13437,7 +13437,7 @@ interpret(void) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); result = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); longAtPointerput(localSP, ((result << 3) | 1)); break; @@ -13454,7 +13454,7 @@ interpret(void) assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(objOop1 + 7); numBytes = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -13549,37 +13549,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) + (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) - (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) * (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) / (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) % (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -13596,28 +13596,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) & (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) | (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) ^ (((longAtPointer(localSP)) >> 3))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 3)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) >> -(((longAtPointer(localSP)) >> 3))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 3)) << (((longAtPointer(localSP)) >> 3))))) << 3) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -13680,13 +13680,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 3)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 3) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 3) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 3)) - 1)) << 2)))); @@ -13883,7 +13883,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13996,10 +13996,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -14158,7 +14158,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l420; } if (slotIndex == InstructionPointerIndex) { @@ -14336,7 +14336,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14525,7 +14525,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14969,7 +14969,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15095,7 +15095,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15192,7 +15192,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -15205,7 +15205,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15899,7 +15899,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 3) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -17560,7 +17560,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17800,15 +17800,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 3) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 3) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 3) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -18183,7 +18183,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -19132,7 +19132,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19925,7 +19925,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); + realHeader = realHeader | ((((usqInt)(1ULL << MethodHeaderFlagBitPosition) << 3) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -20181,7 +20181,7 @@ mnuMethodOrNilFor(sqInt rcvr) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -20448,7 +20448,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 3) | 1); + return (((usqInt)(bcpc + 1) << 3) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -20514,7 +20514,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -20525,22 +20525,22 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -21061,7 +21061,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -21278,12 +21278,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -21317,7 +21317,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21824,9 +21824,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -21875,7 +21875,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -22071,7 +22071,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -22309,7 +22309,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22533,7 +22533,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -22620,31 +22620,21 @@ shortPrintFrame(char *theFP) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -22654,66 +22644,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22735,14 +22672,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -23074,7 +23011,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -23488,7 +23425,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -23660,7 +23597,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -23704,7 +23641,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -23750,7 +23687,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23997,7 +23934,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24376,7 +24313,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -24388,7 +24325,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 3) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 3) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25510,7 +25447,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -25549,7 +25486,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -25590,7 +25527,7 @@ primitiveVoidVMStateForMethod(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -25674,7 +25611,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -25791,7 +25728,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25949,7 +25886,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -26067,7 +26004,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -26175,7 +26112,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -26220,14 +26157,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -26248,7 +26185,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -26623,7 +26560,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -26703,11 +26640,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26717,7 +26654,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -26756,7 +26693,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -26791,7 +26728,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -27272,7 +27209,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27314,10 +27251,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27325,7 +27262,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27340,28 +27277,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27374,10 +27311,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27385,7 +27322,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27400,28 +27337,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27492,10 +27429,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -27503,7 +27440,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27518,28 +27455,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27552,10 +27489,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27563,7 +27500,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27578,28 +27515,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27693,7 +27630,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -27820,10 +27757,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27831,7 +27768,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27846,28 +27783,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27879,10 +27816,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27890,7 +27827,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27905,28 +27842,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -28010,7 +27947,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -28319,14 +28256,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -28358,7 +28295,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -28377,7 +28314,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -28967,7 +28904,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -29254,7 +29191,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29286,7 +29223,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -29400,7 +29337,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29477,7 +29414,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -29530,7 +29467,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29566,7 +29503,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -29690,7 +29627,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -29753,7 +29690,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -29980,7 +29917,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -30080,7 +30017,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30117,7 +30054,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30176,7 +30113,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -30190,7 +30127,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -30312,7 +30249,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30349,7 +30286,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30425,7 +30362,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30463,7 +30400,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30534,7 +30471,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30572,7 +30509,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30643,7 +30580,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30681,7 +30618,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30752,7 +30689,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30790,7 +30727,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30861,7 +30798,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -30899,7 +30836,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -30971,7 +30908,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31008,7 +30945,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31076,7 +31013,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31114,7 +31051,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31186,7 +31123,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -31223,7 +31160,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -31336,7 +31273,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -31376,7 +31313,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -31418,7 +31355,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -31541,7 +31478,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -31630,7 +31567,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31834,7 +31771,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31888,7 +31825,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -32092,7 +32029,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32142,7 +32079,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -32196,7 +32133,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -32383,7 +32320,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32531,10 +32468,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -32552,7 +32489,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32591,7 +32528,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -32609,7 +32546,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -32742,10 +32679,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32867,7 +32804,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -32889,7 +32826,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -32987,7 +32924,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -33009,7 +32946,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -33098,7 +33035,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -33124,7 +33061,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -33195,7 +33132,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -33251,7 +33188,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -33290,7 +33227,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -33298,7 +33235,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -33324,6 +33261,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -33332,7 +33270,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((((integerPointer) & 7) == 1)) { index = (integerPointer >> 3); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -33340,10 +33278,30 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -33369,32 +33327,32 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = numSlots; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -33434,7 +33392,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33629,7 +33587,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -33659,7 +33617,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -34113,7 +34071,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -34142,7 +34100,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -34158,7 +34116,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -34175,7 +34133,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -34256,7 +34214,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -34344,10 +34302,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -34415,7 +34373,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -34743,7 +34701,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34789,7 +34747,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34797,7 +34755,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34871,7 +34829,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -34913,7 +34871,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34944,7 +34902,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35000,7 +34958,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -35201,7 +35159,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots4 = byteAt(stack + 7); numSlots1 = (numSlots4 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots4); if (fmt1 <= 5) { stackSize = numSlots1; @@ -35239,7 +35197,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots5 = byteAt(current + 7); numSlots2 = (numSlots5 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots5); if (fmt2 <= 5) { index = numSlots2; @@ -35350,7 +35308,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35377,7 +35335,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(next + 7); numSlots = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { index = numSlots; @@ -35505,7 +35463,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35623,7 +35581,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -35874,7 +35832,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -36181,7 +36139,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36193,7 +36151,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36242,7 +36200,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36254,7 +36212,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36281,7 +36239,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -36293,7 +36251,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -36328,7 +36286,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -36424,10 +36382,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36446,7 +36404,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -36703,7 +36661,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36836,7 +36794,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -36878,7 +36836,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -36992,7 +36950,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -37047,7 +37005,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -37230,7 +37188,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -37271,7 +37229,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -37359,7 +37317,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37432,7 +37390,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37448,7 +37406,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37502,7 +37460,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37540,7 +37498,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37556,7 +37514,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37623,7 +37581,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37639,7 +37597,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37703,7 +37661,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -37729,7 +37687,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37767,7 +37725,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37783,7 +37741,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37846,7 +37804,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37862,7 +37820,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -37925,7 +37883,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -37941,7 +37899,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38004,7 +37962,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38020,7 +37978,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38079,7 +38037,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38117,7 +38075,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38133,7 +38091,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38194,7 +38152,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38210,7 +38168,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38266,7 +38224,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38317,7 +38275,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -38333,7 +38291,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -38435,14 +38393,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -38655,7 +38613,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -38735,11 +38693,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -38749,7 +38707,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -38795,7 +38753,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -38832,7 +38790,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -39094,7 +39052,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -39145,7 +39103,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -39264,7 +39222,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39509,7 +39467,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -39618,7 +39576,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39658,7 +39616,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39700,7 +39658,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39793,7 +39751,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39848,7 +39806,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -39935,7 +39893,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -39966,20 +39924,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -40025,7 +39983,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -40044,14 +40002,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -40060,7 +40018,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -40210,7 +40168,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -40246,7 +40204,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -40284,7 +40242,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -40481,7 +40439,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -40836,7 +40794,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -40868,7 +40826,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - sqInt newFormat; + usqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40928,7 +40886,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -41037,7 +40995,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); return 0; } @@ -41065,7 +41023,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41148,7 +41106,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -41240,7 +41198,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41479,9 +41437,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -41561,7 +41519,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41630,7 +41588,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41675,7 +41633,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -41808,7 +41766,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -41846,7 +41804,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -41907,7 +41865,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -42306,7 +42264,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -42363,9 +42321,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -42900,7 +42858,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43073,7 +43031,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -43345,7 +43303,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -43386,7 +43344,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43416,7 +43374,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43818,7 +43776,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43860,7 +43818,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -43915,7 +43873,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43963,7 +43921,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44027,7 +43985,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -44088,7 +44046,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -44142,7 +44100,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -44197,7 +44155,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -44336,7 +44294,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44373,7 +44331,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -44426,7 +44384,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44472,7 +44430,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44510,7 +44468,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -44598,7 +44556,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44636,7 +44594,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44676,7 +44634,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44733,7 +44691,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -45636,7 +45594,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -45809,7 +45767,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45869,7 +45827,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45962,7 +45920,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46172,7 +46130,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46286,7 +46244,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46452,7 +46410,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46835,7 +46793,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47214,7 +47172,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47256,7 +47214,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -47342,7 +47300,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -47492,7 +47450,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -47721,7 +47679,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -47768,7 +47726,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -47817,7 +47775,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -48063,7 +48021,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -48197,7 +48155,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -48256,7 +48214,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -48329,7 +48287,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -48409,7 +48367,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -48795,7 +48753,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -48833,7 +48791,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49079,7 +49037,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49127,7 +49085,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49177,7 +49135,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -49272,7 +49230,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -49317,7 +49275,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -49364,7 +49322,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50084,7 +50042,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50114,14 +50072,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -50152,7 +50110,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -50204,7 +50162,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -50307,7 +50265,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -50324,7 +50282,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50633,7 +50591,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50671,7 +50629,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50711,7 +50669,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50821,9 +50779,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -50986,9 +50944,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -52140,7 +52098,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52180,7 +52138,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -52319,7 +52277,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -52337,7 +52295,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52359,7 +52317,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52395,7 +52353,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -52465,7 +52423,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -52547,7 +52505,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52573,7 +52531,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -52667,7 +52625,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -52807,7 +52765,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -52852,7 +52810,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -52890,7 +52848,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -52984,9 +52942,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53012,7 +52970,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -53054,9 +53012,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53082,7 +53040,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -53125,9 +53083,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -53154,7 +53112,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -53264,9 +53222,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -53385,7 +53343,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -53602,7 +53560,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -53716,7 +53674,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -53782,7 +53740,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -54326,7 +54284,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54363,7 +54321,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -54856,7 +54814,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -54923,7 +54881,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -54991,7 +54949,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55034,7 +54992,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55070,7 +55028,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -55130,9 +55088,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -55170,7 +55128,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -55184,7 +55142,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -55216,7 +55174,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -55323,7 +55281,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -55345,7 +55303,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -55368,7 +55326,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -55389,7 +55347,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -55467,7 +55425,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -55504,7 +55462,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -55544,7 +55502,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56108,7 +56066,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56154,7 +56112,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56202,7 +56160,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56304,7 +56262,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56357,7 +56315,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56412,7 +56370,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56485,7 +56443,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56530,7 +56488,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56568,7 +56526,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56659,7 +56617,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -56702,7 +56660,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -56740,7 +56698,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -56916,13 +56874,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -56931,9 +56889,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -57092,7 +57050,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57137,7 +57095,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57175,7 +57133,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57322,7 +57280,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57373,7 +57331,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57426,7 +57384,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57525,7 +57483,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57570,7 +57528,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57608,7 +57566,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57739,7 +57697,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57847,9 +57805,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -57896,7 +57854,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -57947,9 +57905,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -57996,7 +57954,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58048,9 +58006,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -58098,7 +58056,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -58782,7 +58740,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -58988,7 +58946,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -59082,7 +59040,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -59136,7 +59094,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -59183,7 +59141,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -59220,7 +59178,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -59343,9 +59301,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -59354,9 +59312,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -59393,7 +59351,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -60042,7 +60000,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -60063,7 +60021,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -60478,7 +60436,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -60601,7 +60559,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -60661,7 +60619,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -60779,8 +60737,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -61167,7 +61125,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -61203,7 +61161,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -61241,7 +61199,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -61634,7 +61592,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -62255,7 +62213,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -62753,7 +62711,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -62819,7 +62777,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -62887,7 +62845,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -62941,7 +62899,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -62981,7 +62939,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -63023,7 +62981,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -63404,7 +63362,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -63551,7 +63509,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63650,7 +63608,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -63915,7 +63873,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -65007,7 +64965,7 @@ isOptimizedMethod(sqInt methodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -65317,7 +65275,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -65332,7 +65290,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -65472,7 +65430,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -65577,7 +65535,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -65610,7 +65568,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -65745,7 +65703,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -65915,7 +65873,7 @@ lookupMNUInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66082,7 +66040,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -66237,7 +66195,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -66408,10 +66366,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -66850,7 +66808,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -67153,7 +67111,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -67352,7 +67310,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -67477,7 +67435,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -67691,7 +67649,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -67737,7 +67695,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -67782,7 +67740,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -67820,7 +67778,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -68422,7 +68380,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68733,7 +68691,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -68970,7 +68928,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69209,7 +69167,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -69326,7 +69284,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -69683,7 +69641,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -69716,7 +69674,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -70193,7 +70151,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -70220,11 +70178,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -71143,6 +71101,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -71156,13 +71115,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -71418,7 +71382,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -71561,7 +71525,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -71665,7 +71629,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -71719,8 +71683,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -71730,7 +71694,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -71753,8 +71717,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -72192,7 +72156,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -72211,16 +72175,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -72234,25 +72198,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -72260,7 +72224,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -72321,7 +72285,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72399,10 +72363,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -72410,7 +72374,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -72441,14 +72405,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72601,7 +72565,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -72732,7 +72696,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -72969,9 +72933,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -73139,7 +73103,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -73409,7 +73373,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -73489,11 +73453,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -73503,7 +73467,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -73539,7 +73503,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -73598,11 +73562,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -73612,7 +73576,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -73683,8 +73647,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -73705,7 +73669,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -73872,7 +73836,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74043,7 +74007,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -74118,7 +74082,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -74218,7 +74182,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -74287,7 +74251,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -74330,7 +74294,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -74498,7 +74462,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -74552,7 +74516,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -74562,7 +74526,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -74621,7 +74585,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -74914,7 +74878,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -74951,7 +74915,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -74996,12 +74960,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -75237,7 +75201,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -75246,7 +75210,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -75286,7 +75250,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -75326,7 +75290,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75382,11 +75346,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -75396,7 +75360,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -75423,7 +75387,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -75455,7 +75419,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -75707,7 +75671,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -76081,9 +76045,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -76098,7 +76062,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -76125,9 +76089,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -76136,9 +76100,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -76147,7 +76111,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -76159,10 +76123,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -76208,7 +76172,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -76240,9 +76204,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -76311,7 +76275,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -76319,7 +76283,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -76338,7 +76302,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -76346,7 +76310,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76357,12 +76321,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76374,7 +76338,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76385,12 +76349,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -76508,7 +76472,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -76693,17 +76657,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76712,7 +76676,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -76739,80 +76703,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -76822,7 +76786,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76832,15 +76796,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 3) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76962,17 +76926,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 3) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -76996,15 +76960,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -77048,22 +77012,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -77075,43 +77039,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -77119,37 +77083,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -77158,7 +77122,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77167,14 +77131,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -77209,15 +77173,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 3) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -77227,13 +77191,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -77286,7 +77250,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -77297,13 +77261,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -77312,7 +77276,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -77323,7 +77287,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77332,7 +77296,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77340,7 +77304,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77349,7 +77313,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 3) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -77357,7 +77321,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -77380,7 +77344,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -77601,7 +77565,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -77655,7 +77619,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -77702,7 +77666,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spursista64src/vm/vmCallback.h b/spursista64src/vm/vmCallback.h index f5c9e05d68..6c4fdfda5e 100644 --- a/spursista64src/vm/vmCallback.h +++ b/spursista64src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/spursistasrc/vm/cogit.h b/spursistasrc/vm/cogit.h index 6bc529b6a2..c3ecf1d543 100644 --- a/spursistasrc/vm/cogit.h +++ b/spursistasrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -120,15 +120,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/spursistasrc/vm/cogitARMv5.c b/spursistasrc/vm/cogitARMv5.c index b06c51f5ff..f00f015d40 100644 --- a/spursistasrc/vm/cogitARMv5.c +++ b/spursistasrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -328,10 +328,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [5]; + usqIntptr_t machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -447,7 +447,7 @@ static sqInt NoDbgRegParms isAnInstruction(AbstractInstruction * self_in_isAnIns static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -506,7 +506,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms inverseOpcodeFor(AbstractInstruction * self_in_inverseOpcodeFor, sqInt armOpcode); static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); -static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand); +static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCRelativeValueLoad(AbstractInstruction * self_in_isPCRelativeValueLoad, unsigned int instr); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -725,7 +725,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1003,7 +1003,7 @@ static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmp static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral); static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static usqInt NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms literalLoadInstructionBytes(AbstractInstruction * self_in_literalLoadInstructionBytes); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); @@ -1152,7 +1152,7 @@ extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); static sqInt maybeAllocAndInitCounters(void); static usqInt NoDbgRegParms picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod); -static sqInt NoDbgRegParms picDataForCounterat(unsigned long counter, sqInt bcpc); +static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc); static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClassOrNil, char *sendMcpc, sqInt sendBcpc); static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); @@ -1321,7 +1321,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1329,9 +1329,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1367,7 +1367,7 @@ static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; static sqInt ceTrapTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1388,7 +1388,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1949,7 +1949,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -2021,10 +2021,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2277,7 +2277,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2880,8 +2880,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - unsigned long hiReg; - unsigned long loReg; + usqIntptr_t hiReg; + usqIntptr_t loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2900,7 +2900,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - usqInt instr; + sqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -2947,7 +2947,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - unsigned long flags; + usqIntptr_t flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2977,8 +2977,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - unsigned long srcA; - unsigned long srcB; + usqIntptr_t srcA; + usqIntptr_t srcB; /* NOTE: srcB contains the other mutiplicand at this point. It is OK to use it as the destination for the low part of the result and in fact this saves us moving it later */ @@ -3031,7 +3031,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3160,54 +3160,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord81; sqInt aWord82; sqInt aWord9; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; - unsigned long baseReg2; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; + usqIntptr_t baseReg2; sqInt constant; - unsigned long constant1; - unsigned long constant10; - unsigned long constant11; - unsigned long constant12; - unsigned long constant13; - unsigned long constant14; - unsigned long constant2; - unsigned long constant3; - unsigned long constant4; - unsigned long constant5; - unsigned long constant6; - unsigned long constant7; - unsigned long constant8; - unsigned long constant9; + usqIntptr_t constant1; + usqIntptr_t constant10; + usqIntptr_t constant11; + usqIntptr_t constant12; + usqIntptr_t constant13; + usqIntptr_t constant14; + usqIntptr_t constant2; + usqIntptr_t constant3; + usqIntptr_t constant4; + usqIntptr_t constant5; + usqIntptr_t constant6; + usqIntptr_t constant7; + usqIntptr_t constant8; + usqIntptr_t constant9; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destAddr; - unsigned long destAddr1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destAddr; + usqIntptr_t destAddr1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt distance2; - unsigned long distReg; - unsigned long distReg1; - unsigned long distReg2; - unsigned long dstReg; - unsigned long dstReg1; + usqIntptr_t distReg; + usqIntptr_t distReg1; + usqIntptr_t distReg2; + usqIntptr_t dstReg; + usqIntptr_t dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode2; @@ -3216,7 +3216,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode5; sqInt flagsOrOpcode6; sqInt flagsOrOpcode7; - unsigned long fpReg; + usqIntptr_t fpReg; sqInt hb; sqInt hb1; sqInt hb2; @@ -3262,10 +3262,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3366,7 +3366,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -3382,84 +3382,84 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset31; sqInt offset32; sqInt offset33; - long offset4; + sqIntptr_t offset4; sqInt offset5; sqInt offset6; - long offset7; + sqIntptr_t offset7; sqInt offset8; sqInt offset9; sqInt p; - unsigned long rd; - unsigned long rd1; - unsigned long rd10; - unsigned long rd11; - unsigned long rd12; - unsigned long rd13; - unsigned long rd14; - unsigned long rd15; - unsigned long rd16; - unsigned long rd17; - unsigned long rd18; - unsigned long rd19; - unsigned long rd2; - unsigned long rd20; - unsigned long rd21; - unsigned long rd22; - unsigned long rd23; - unsigned long rd24; - unsigned long rd3; - unsigned long rd4; - unsigned long rd5; - unsigned long rd6; - unsigned long rd7; - unsigned long rd8; - unsigned long rd9; - unsigned long reg; - unsigned long reg1; - unsigned long reg2; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long regA; - unsigned long regB; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long rn; - unsigned long rn1; - unsigned long rn10; - unsigned long rn11; - unsigned long rn12; - unsigned long rn13; - unsigned long rn14; - unsigned long rn15; - unsigned long rn16; - unsigned long rn17; - unsigned long rn18; - unsigned long rn19; - unsigned long rn2; - unsigned long rn20; - unsigned long rn21; - unsigned long rn22; - unsigned long rn23; - unsigned long rn24; - unsigned long rn25; - unsigned long rn26; - unsigned long rn3; - unsigned long rn4; - unsigned long rn5; - unsigned long rn6; - unsigned long rn7; - unsigned long rn8; - unsigned long rn9; + usqIntptr_t rd; + usqIntptr_t rd1; + usqIntptr_t rd10; + usqIntptr_t rd11; + usqIntptr_t rd12; + usqIntptr_t rd13; + usqIntptr_t rd14; + usqIntptr_t rd15; + usqIntptr_t rd16; + usqIntptr_t rd17; + usqIntptr_t rd18; + usqIntptr_t rd19; + usqIntptr_t rd2; + usqIntptr_t rd20; + usqIntptr_t rd21; + usqIntptr_t rd22; + usqIntptr_t rd23; + usqIntptr_t rd24; + usqIntptr_t rd3; + usqIntptr_t rd4; + usqIntptr_t rd5; + usqIntptr_t rd6; + usqIntptr_t rd7; + usqIntptr_t rd8; + usqIntptr_t rd9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg2; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t regA; + usqIntptr_t regB; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t rn; + usqIntptr_t rn1; + usqIntptr_t rn10; + usqIntptr_t rn11; + usqIntptr_t rn12; + usqIntptr_t rn13; + usqIntptr_t rn14; + usqIntptr_t rn15; + usqIntptr_t rn16; + usqIntptr_t rn17; + usqIntptr_t rn18; + usqIntptr_t rn19; + usqIntptr_t rn2; + usqIntptr_t rn20; + usqIntptr_t rn21; + usqIntptr_t rn22; + usqIntptr_t rn23; + usqIntptr_t rn24; + usqIntptr_t rn25; + usqIntptr_t rn26; + usqIntptr_t rn3; + usqIntptr_t rn4; + usqIntptr_t rn5; + usqIntptr_t rn6; + usqIntptr_t rn7; + usqIntptr_t rn8; + usqIntptr_t rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3474,30 +3474,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - unsigned long src; - unsigned long src1; - unsigned long srcAddr; - unsigned long srcAddr1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg16; - unsigned long srcReg17; - unsigned long srcReg18; - unsigned long srcReg19; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcAddr; + usqIntptr_t srcAddr1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg16; + usqIntptr_t srcReg17; + usqIntptr_t srcReg18; + usqIntptr_t srcReg19; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt u; int u1; sqInt u2; @@ -3506,14 +3506,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - long val; - long val1; - unsigned long val2; - long val3; - long val4; - long val5; - long val6; - long val7; + sqIntptr_t val; + sqIntptr_t val1; + usqIntptr_t val2; + sqIntptr_t val3; + sqIntptr_t val4; + sqIntptr_t val5; + sqIntptr_t val6; + sqIntptr_t val7; sqInt value; unsigned int value1; unsigned int value2; @@ -3522,9 +3522,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value5; unsigned int value6; sqInt word; - unsigned long word1; + usqIntptr_t word1; sqInt word2; - unsigned long word3; + usqIntptr_t word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -3590,11 +3590,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget = jumpTarget1; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord43 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord43; instrOffset6 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3624,11 +3624,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget2 = jumpTarget11; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord44 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord44; instrOffset7 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4145,11 +4145,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd2 = rn4; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord45 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord45; instrOffset8 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4243,7 +4243,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val5 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val5) { rot11 = 32 - i13; - immediate14 = (((usqInt) val5) >> i13) | ((((long)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val5) >> i13) | ((((sqIntptr_t)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord46 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn5 << 16) | (rd3 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord46; @@ -4276,11 +4276,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd22 = rn24; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord80 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord80; instrOffset27 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4360,11 +4360,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd4 = rn6; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord47 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord47; instrOffset9 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4448,11 +4448,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd5 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord48 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord48; instrOffset10 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4487,7 +4487,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val6 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val6) { rot12 = 32 - i14; - immediate15 = (((usqInt) val6) >> i14) | ((((long)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); + immediate15 = (((usqInt) val6) >> i14) | ((((sqIntptr_t)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord49 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn8 << 16) | (rd6 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot12) >> 1)) << 8))) | immediate15) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord49; @@ -4520,11 +4520,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd23 = rn25; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord81 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord81; instrOffset28 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4599,11 +4599,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd7 = rn9; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord50 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord50; instrOffset11 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4651,11 +4651,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd8 = rn10; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord51 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord51; instrOffset12 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4749,7 +4749,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i15 = 2; i15 <= 30; i15 += 2) { if ((val7 & (((0xFFU << i15) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i15)))) == val7) { rot13 = 32 - i15; - immediate16 = (((usqInt) val7) >> i15) | ((((long)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); + immediate16 = (((usqInt) val7) >> i15) | ((((sqIntptr_t)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord52 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd9 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate16) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord52; @@ -4782,11 +4782,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd24 = rn26; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord82 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord82; instrOffset29 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4810,11 +4810,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd10 = rn12; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord53 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord53; instrOffset13 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4830,11 +4830,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd11 = rn13; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord54 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord54; instrOffset14 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4850,11 +4850,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd12 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord55 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord55; instrOffset15 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4870,11 +4870,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd13 = rn15; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord56 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord56; instrOffset16 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4890,11 +4890,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd14 = rn16; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord57 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord57; instrOffset17 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4910,11 +4910,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd15 = rn17; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord58 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord58; instrOffset18 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5074,11 +5074,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord36 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord36; instrOffset = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5278,11 +5278,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord213 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord213; instrOffset19 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5307,11 +5307,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord214 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord214; instrOffset20 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5336,11 +5336,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord215 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord215; instrOffset21 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5365,11 +5365,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord216 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord216; instrOffset22 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5420,11 +5420,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord310 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord310; instrOffset23 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5481,11 +5481,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord311 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord311; instrOffset24 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5542,11 +5542,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord312 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord312; instrOffset25 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5592,11 +5592,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord38 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord38; instrOffset1 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5652,11 +5652,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord39 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord39; instrOffset2 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5763,11 +5763,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord40 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord40; instrOffset3 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5854,11 +5854,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord41 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord41; instrOffset4 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); @@ -5937,11 +5937,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord220 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord220; instrOffset26 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -6496,7 +6496,7 @@ isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, s /* CogARMCompiler>>#isInImmediateJumpRange: */ static sqInt NoDbgRegParms -isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand) +isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand) { return (((((int) operand)) >= -33554432) && ((((int) operand)) <= 0x1FFFFFC)); } @@ -6667,11 +6667,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - unsigned long distance; + usqIntptr_t distance; sqInt i; sqInt immediate; sqInt negate; - unsigned long operand; + usqIntptr_t operand; sqInt rot; sqInt value; @@ -6721,11 +6721,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_loadCwInto->dependent))->address))); - assert((abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord1 = ldrrnplusimm(self_in_loadCwInto, destReg, PC, (((((self_in_loadCwInto->dependent))->address)) >= (((self_in_loadCwInto->address)) + 8) ? 1 - : 0), abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); + : 0), SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); ((self_in_loadCwInto->machineCode))[0 / 4] = aWord1; return ((usqInt) (((self_in_loadCwInto->machineCodeSize) = 4))); } @@ -7628,7 +7628,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - sqInt end; + usqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -7672,7 +7672,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8712,7 +8712,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca sqInt address; usqInt addressFollowingJump; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8945,9 +8945,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -9204,7 +9204,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -9650,8 +9650,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9695,8 +9695,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -9765,7 +9765,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10675,8 +10675,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) sqInt address1; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -10750,7 +10750,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10758,7 +10758,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10852,7 +10852,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10901,7 +10901,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10998,14 +10998,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -11068,9 +11068,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -11162,9 +11162,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -11198,8 +11198,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -11218,7 +11218,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -11227,7 +11227,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -12094,7 +12094,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -13046,7 +13046,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -17561,7 +17561,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17598,7 +17598,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -18069,7 +18069,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction4 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); if (usesOutOfLineLiteral(anInstruction4)) { @@ -18086,7 +18086,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18122,7 +18122,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -19101,7 +19101,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -19429,7 +19429,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn (anInstruction8->dependent = locateLiteral(offset1)); } /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); if (usesOutOfLineLiteral(anInstruction9)) { @@ -20870,7 +20870,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction6->dependent = locateLiteral(offset)); } /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant3, TempReg); if (usesOutOfLineLiteral(anInstruction7)) { @@ -20884,7 +20884,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction8->dependent = locateLiteral(offset1)); } /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant4, TempReg); if (usesOutOfLineLiteral(anInstruction9)) { @@ -21025,7 +21025,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); if (usesOutOfLineLiteral(anInstruction)) { @@ -21039,9 +21039,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); if (usesOutOfLineLiteral(anInstruction2)) { @@ -21065,7 +21065,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -21969,7 +21969,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - unsigned long literal; + usqIntptr_t literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -22023,7 +22023,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) */ /* CogOutOfLineLiteralsARMCompiler>>#isSharable */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable) { assert(((self_in_isSharable->opcode)) == Literal); @@ -22227,7 +22227,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -23199,7 +23199,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -23217,7 +23217,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ checkLiteralforInstruction(address10, genoperandoperand(MoveRAw, TempReg, address10)); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget1, genoperand(CallFull, callTarget1)); @@ -23739,7 +23739,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -24225,7 +24225,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -24273,7 +24273,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -24290,7 +24290,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -24334,7 +24334,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -24722,7 +24722,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -24744,15 +24744,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -24977,9 +24977,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -24997,17 +24997,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -25017,7 +25017,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -25276,7 +25276,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25634,12 +25634,12 @@ compileBlockBodies(void) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -25702,13 +25702,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -28523,9 +28523,9 @@ getJumpTargetPCAt(sqInt pc) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initialCounterValue = MaxCounterValue; @@ -28555,7 +28555,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -28615,7 +28615,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -28773,13 +28773,18 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) return ((sqInt) 0); } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataForCounter:at: */ static sqInt NoDbgRegParms -picDataForCounterat(unsigned long counter, sqInt bcpc) +picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned long executedCount; + unsigned int executedCount; sqInt tuple; - unsigned long untakenCount; + unsigned int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -28788,7 +28793,7 @@ picDataForCounterat(unsigned long counter, sqInt bcpc) assert(CounterBytes == 4); executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); - storePointerUncheckedofObjectwithValue(0, tuple, ((bcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); return tuple; @@ -28817,7 +28822,7 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass if (tuple == 0) { return 0; } - storePointerUncheckedofObjectwithValue(0, tuple, ((sendBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)sendBcpc << 1) | 1)); if (((cogMethod->cmType)) == CMMethod) { class = (!(methodClassOrNil) ? classForInlineCacheTag(longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((usqInt)sendMcpc)) - 8))))) @@ -28839,13 +28844,18 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass return 0; } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataFor:Annotation:Mcpc:Bcpc:Method: */ static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt annotation; sqInt association; - unsigned long counter; + unsigned int counter; sqInt entryPoint; sqInt methodClassIfSuper; sqInt sendTable; @@ -28862,7 +28872,7 @@ picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackw /* it's a branch; conditional? */ if (((descriptor->isBranchTrue)) || ((descriptor->isBranchFalse))) { - counter = (((unsigned long *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; + counter = (((usqInt *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; tuple = picDataForCounterat(counter, bcpc + 1); if (tuple == 0) { return PrimErrNoMemory; @@ -28936,7 +28946,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -30808,7 +30818,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -30895,7 +30905,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -31480,7 +31490,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursistasrc/vm/cogitIA32.c b/spursistasrc/vm/cogitIA32.c index e652d9d860..e1c6c3e997 100644 --- a/spursistasrc/vm/cogitIA32.c +++ b/spursistasrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -345,8 +345,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -462,7 +462,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -518,7 +518,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); static sqInt NoDbgRegParms jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize); @@ -714,7 +714,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1117,7 +1117,7 @@ extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); static sqInt maybeAllocAndInitCounters(void); static usqInt NoDbgRegParms picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod); -static sqInt NoDbgRegParms picDataForCounterat(unsigned long counter, sqInt bcpc); +static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc); static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClassOrNil, char *sendMcpc, sqInt sendBcpc); static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); @@ -1286,7 +1286,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1294,9 +1294,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1332,7 +1332,7 @@ static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; static sqInt ceTrapTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1353,7 +1353,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1910,7 +1910,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1980,10 +1980,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2243,7 +2243,7 @@ isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2793,7 +2793,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2807,7 +2807,7 @@ computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -2821,8 +2821,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2835,8 +2835,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2853,8 +2853,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2898,41 +2898,41 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2999,14 +2999,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - unsigned long mask; - unsigned long mask1; - unsigned long mask2; + usqIntptr_t mask; + usqIntptr_t mask1; + usqIntptr_t mask2; sqInt mcIdx; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -3017,7 +3017,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - unsigned long offset12; + usqIntptr_t offset12; sqInt offset120; sqInt offset121; sqInt offset122; @@ -3029,7 +3029,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -3040,108 +3040,108 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; - unsigned long offset9; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg24; - unsigned long reg25; - unsigned long reg26; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS10; - unsigned long regLHS11; - unsigned long regLHS12; - unsigned long regLHS13; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regLHS5; - unsigned long regLHS6; - unsigned long regLHS7; - unsigned long regLHS8; - unsigned long regLHS9; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS10; - unsigned long regRHS11; - unsigned long regRHS12; - unsigned long regRHS13; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regRHS5; - unsigned long regRHS6; - unsigned long regRHS7; - unsigned long regRHS8; - unsigned long regRHS9; - unsigned long regToShift; - unsigned long regToShift1; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; + usqIntptr_t offset9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg24; + usqIntptr_t reg25; + usqIntptr_t reg26; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS10; + usqIntptr_t regLHS11; + usqIntptr_t regLHS12; + usqIntptr_t regLHS13; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regLHS5; + usqIntptr_t regLHS6; + usqIntptr_t regLHS7; + usqIntptr_t regLHS8; + usqIntptr_t regLHS9; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS10; + usqIntptr_t regRHS11; + usqIntptr_t regRHS12; + usqIntptr_t regRHS13; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regRHS5; + usqIntptr_t regRHS6; + usqIntptr_t regRHS7; + usqIntptr_t regRHS8; + usqIntptr_t regRHS9; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; sqInt shiftCount; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt swapreg; - unsigned long value; - unsigned long value1; - unsigned long value10; - unsigned long value11; - unsigned long value12; - unsigned long value13; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long value9; - unsigned long word; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value10; + usqIntptr_t value11; + usqIntptr_t value12; + usqIntptr_t value13; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t value9; + usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { dispatchConcretizeProcessorSpecific(self_in_dispatchConcretize); @@ -5439,25 +5439,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg2; - unsigned long destReg3; - unsigned long offset; - unsigned long offset1; - unsigned long offset2; - unsigned long offset3; - unsigned long reg; - unsigned long reg1; - unsigned long reg11; - unsigned long reg2; - unsigned long reg21; - unsigned long reg3; - unsigned long regDivisor; - unsigned long srcReg; - unsigned long srcReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t offset; + usqIntptr_t offset1; + usqIntptr_t offset2; + usqIntptr_t offset3; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg11; + usqIntptr_t reg2; + usqIntptr_t reg21; + usqIntptr_t reg3; + usqIntptr_t regDivisor; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6582,7 +6582,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) /* CogIA32Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((int) operand)) >= -128) && ((((int) operand)) <= 0x7F)); } @@ -7078,9 +7078,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -7512,7 +7512,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8530,7 +8530,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8762,9 +8762,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -9010,7 +9010,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -9393,8 +9393,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9438,8 +9438,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -9508,7 +9508,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt caseEndAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10401,8 +10401,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10461,7 +10461,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10469,7 +10469,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10559,7 +10559,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10608,7 +10608,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10705,14 +10705,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -10770,9 +10770,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -10864,9 +10864,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -10901,8 +10901,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10922,7 +10922,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -10936,7 +10936,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -11758,7 +11758,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -12710,7 +12710,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -17036,7 +17036,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17067,7 +17067,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17471,7 +17471,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -17482,7 +17482,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17508,7 +17508,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18304,7 +18304,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -18561,7 +18561,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ @@ -19674,13 +19674,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -19806,7 +19806,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -19817,9 +19817,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -19835,7 +19835,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -21160,7 +21160,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction111 = genoperand(CallFull, callTarget); abstractInstruction2 = anInstruction111; @@ -21177,7 +21177,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction112 = genoperand(CallFull, callTarget1); abstractInstruction3 = anInstruction112; @@ -21659,7 +21659,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -22129,7 +22129,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin annotateCall: */ anInstruction18 = genoperand(CallFull, callTarget); abstractInstruction = anInstruction18; @@ -22177,7 +22177,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -22194,7 +22194,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -22238,7 +22238,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -22611,7 +22611,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -22633,15 +22633,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -22862,9 +22862,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -22882,17 +22882,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -22902,7 +22902,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -23161,7 +23161,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -23519,12 +23519,12 @@ compileBlockBodies(void) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -23587,13 +23587,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -26199,12 +26199,12 @@ getJumpTargetPCAt(sqInt pc) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; - unsigned long fixupSize1; + usqIntptr_t fixupSize; + usqIntptr_t fixupSize1; sqInt numberOfAbstractOpcodes; sqInt numberOfAbstractOpcodes1; - unsigned long opcodeSize; - unsigned long opcodeSize1; + usqIntptr_t opcodeSize; + usqIntptr_t opcodeSize1; sqInt startAddress1; sqInt startAddress2; @@ -26230,7 +26230,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateCheckFeatures(backEnd); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceCheckFeaturesFunction", startAddress1); - ceCheckFeaturesFunction = ((unsigned long (*)(void)) startAddress1); + ceCheckFeaturesFunction = ((usqIntptr_t (*)(void)) startAddress1); /* begin maybeGenerateICacheFlush */ /* begin generateVMOwnerLockFunctions */ @@ -26251,7 +26251,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress2); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress2); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress2); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress2); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -26311,7 +26311,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -26469,13 +26469,18 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) return ((sqInt) 0); } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataForCounter:at: */ static sqInt NoDbgRegParms -picDataForCounterat(unsigned long counter, sqInt bcpc) +picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned long executedCount; + unsigned int executedCount; sqInt tuple; - unsigned long untakenCount; + unsigned int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -26484,7 +26489,7 @@ picDataForCounterat(unsigned long counter, sqInt bcpc) assert(CounterBytes == 4); executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); - storePointerUncheckedofObjectwithValue(0, tuple, ((bcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); return tuple; @@ -26513,7 +26518,7 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass if (tuple == 0) { return 0; } - storePointerUncheckedofObjectwithValue(0, tuple, ((sendBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)sendBcpc << 1) | 1)); if (((cogMethod->cmType)) == CMMethod) { class = (!(methodClassOrNil) ? classForInlineCacheTag(inlineCacheTagAt(backEnd, ((usqInt)sendMcpc))) @@ -26535,13 +26540,18 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass return 0; } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataFor:Annotation:Mcpc:Bcpc:Method: */ static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt annotation; sqInt association; - unsigned long counter; + unsigned int counter; sqInt entryPoint; sqInt methodClassIfSuper; sqInt sendTable; @@ -26558,7 +26568,7 @@ picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackw /* it's a branch; conditional? */ if (((descriptor->isBranchTrue)) || ((descriptor->isBranchFalse))) { - counter = (((unsigned long *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; + counter = (((usqInt *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; tuple = picDataForCounterat(counter, bcpc + 1); if (tuple == 0) { return PrimErrNoMemory; @@ -26632,7 +26642,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -28432,7 +28442,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -28507,7 +28517,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -29064,7 +29074,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursistasrc/vm/cogitMIPSEL.c b/spursistasrc/vm/cogitMIPSEL.c index 2f7482d701..c5afa07b34 100644 --- a/spursistasrc/vm/cogitMIPSEL.c +++ b/spursistasrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -373,10 +373,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [7]; + usqIntptr_t machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -489,7 +489,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1260,7 +1260,7 @@ extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); static sqInt maybeAllocAndInitCounters(void); static usqInt NoDbgRegParms picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod); -static sqInt NoDbgRegParms picDataForCounterat(unsigned long counter, sqInt bcpc); +static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc); static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClassOrNil, char *sendMcpc, sqInt sendBcpc); static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); @@ -1429,7 +1429,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1437,9 +1437,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1475,7 +1475,7 @@ static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; static sqInt ceTrapTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1496,7 +1496,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -2053,7 +2053,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -2119,10 +2119,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2374,7 +2374,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2791,7 +2791,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3809,7 +3809,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -4041,9 +4041,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4297,7 +4297,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4706,8 +4706,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -4751,8 +4751,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -4820,7 +4820,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -5723,8 +5723,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5794,7 +5794,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5802,7 +5802,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -5892,7 +5892,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -5941,7 +5941,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6045,7 +6045,7 @@ generateMapAtstart(sqInt addressOrNull, sqInt startAddress) sqInt location; sqInt mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6103,9 +6103,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6197,9 +6197,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6233,8 +6233,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -6253,7 +6253,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6262,7 +6262,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -8027,7 +8027,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8684,7 +8684,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqLong callDelta; - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; sqLong refDelta; @@ -10838,8 +10838,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -10877,8 +10877,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -10908,8 +10908,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -10930,8 +10930,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -10953,8 +10953,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -10984,8 +10984,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -11005,9 +11005,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long dstReg; - unsigned long srcReg; - unsigned long value; + usqIntptr_t dstReg; + usqIntptr_t srcReg; + usqIntptr_t value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -11032,8 +11032,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -11055,8 +11055,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -11072,7 +11072,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -11087,8 +11087,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -11123,9 +11123,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -11156,8 +11156,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -11193,8 +11193,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -11228,9 +11228,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -11260,9 +11260,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -11297,9 +11297,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -11334,9 +11334,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -11371,9 +11371,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -11408,9 +11408,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -11445,9 +11445,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -11482,9 +11482,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -11519,9 +11519,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -11627,8 +11627,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - unsigned long dividendReg; - unsigned long divisorReg; + usqIntptr_t dividendReg; + usqIntptr_t divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -11777,7 +11777,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -11878,8 +11878,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -11909,7 +11909,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -11924,8 +11924,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -11941,7 +11941,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -11956,8 +11956,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -11975,8 +11975,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -12008,8 +12008,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -12038,7 +12038,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -12058,7 +12058,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -12077,7 +12077,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12091,7 +12091,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12105,9 +12105,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -12123,9 +12123,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -12145,8 +12145,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -12181,8 +12181,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -12214,8 +12214,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -12244,9 +12244,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -12262,9 +12262,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -12280,9 +12280,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - unsigned long baseReg; + usqIntptr_t baseReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -12298,8 +12298,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -12315,9 +12315,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -12338,9 +12338,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -12363,9 +12363,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; /* index is number of *bytes* */ @@ -12388,9 +12388,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -12416,8 +12416,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -12443,7 +12443,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12467,8 +12467,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -12489,8 +12489,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -12512,8 +12512,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -12529,7 +12529,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12545,7 +12545,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -12578,7 +12578,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -12602,7 +12602,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12662,8 +12662,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -12701,8 +12701,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -12732,8 +12732,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -12754,8 +12754,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -12777,8 +12777,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -12793,8 +12793,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -12814,8 +12814,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -12847,8 +12847,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -12870,8 +12870,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -14107,9 +14107,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - unsigned long newBranchLeft; + usqIntptr_t newBranchLeft; sqInt newBranchOpcode; - unsigned long newBranchRight; + usqIntptr_t newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -14458,7 +14458,7 @@ relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_i static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) { - sqInt newValue; + usqInt newValue; usqInt oldValue; if (((opcodeAtAddress(self_in_relocateMethodReferenceBeforeAddressby, pc - 8)) == ADDIU) @@ -14776,7 +14776,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -16526,7 +16526,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -16557,7 +16557,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -16961,7 +16961,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -16972,7 +16972,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -16998,7 +16998,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17996,7 +17996,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ @@ -19121,13 +19121,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -19253,7 +19253,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -19264,9 +19264,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -19282,7 +19282,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -20602,7 +20602,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -20617,7 +20617,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -21082,7 +21082,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -21561,7 +21561,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -21609,7 +21609,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -21626,7 +21626,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -21670,7 +21670,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -22043,7 +22043,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -22065,15 +22065,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -22294,9 +22294,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -22314,17 +22314,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -22334,7 +22334,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -22593,7 +22593,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -22951,12 +22951,12 @@ compileBlockBodies(void) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -23019,13 +23019,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; counters = 0; @@ -25640,9 +25640,9 @@ getJumpTargetPCAt(sqInt pc) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initialCounterValue = MaxCounterValue; @@ -25672,7 +25672,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -25732,7 +25732,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -25890,13 +25890,18 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) return ((sqInt) 0); } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataForCounter:at: */ static sqInt NoDbgRegParms -picDataForCounterat(unsigned long counter, sqInt bcpc) +picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned long executedCount; + unsigned int executedCount; sqInt tuple; - unsigned long untakenCount; + unsigned int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -25905,7 +25910,7 @@ picDataForCounterat(unsigned long counter, sqInt bcpc) assert(CounterBytes == 4); executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); - storePointerUncheckedofObjectwithValue(0, tuple, ((bcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); return tuple; @@ -25934,7 +25939,7 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass if (tuple == 0) { return 0; } - storePointerUncheckedofObjectwithValue(0, tuple, ((sendBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)sendBcpc << 1) | 1)); if (((cogMethod->cmType)) == CMMethod) { class = (!(methodClassOrNil) ? classForInlineCacheTag(inlineCacheTagAt(backEnd, ((usqInt)sendMcpc))) @@ -25956,13 +25961,18 @@ picDataForSendTomethodClassIfSuperatbcpc(CogMethod *cogMethod, sqInt methodClass return 0; } + +/* N.B. Counters are always 32-bits, having two 16-bit halves for the reached + and taken counts. + */ + /* SistaCogit>>#picDataFor:Annotation:Mcpc:Bcpc:Method: */ static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt annotation; sqInt association; - unsigned long counter; + unsigned int counter; usqInt entryPoint; sqInt methodClassIfSuper; sqInt sendTable; @@ -25979,7 +25989,7 @@ picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackw /* it's a branch; conditional? */ if (((descriptor->isBranchTrue)) || ((descriptor->isBranchFalse))) { - counter = (((unsigned long *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; + counter = (((usqInt *) (((((CogMethod *) cogMethodArg))->counters))))[counterIndex]; tuple = picDataForCounterat(counter, bcpc + 1); if (tuple == 0) { return PrimErrNoMemory; @@ -26053,7 +26063,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -27867,7 +27877,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -27942,7 +27952,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -28499,7 +28509,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursistasrc/vm/cointerp.c b/spursistasrc/vm/cointerp.c index fe0f1b6181..b9d74c18a3 100644 --- a/spursistasrc/vm/cointerp.c +++ b/spursistasrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -549,7 +549,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -648,7 +648,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -845,7 +846,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1437,7 +1438,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1486,7 +1487,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1531,8 +1532,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1756,7 +1757,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1764,12 +1765,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1812,7 +1813,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2433,7 +2434,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2564,7 +2565,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4466,7 +4467,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5457,7 +5458,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5523,7 +5524,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5589,7 +5590,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5655,7 +5656,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5897,7 +5898,7 @@ interpret(void) l495: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5923,7 +5924,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l497; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l497: /* end internalQuickPrimitiveResponse */; goto l494; } @@ -6063,7 +6064,7 @@ interpret(void) goto l489; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l489: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6233,7 +6234,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6307,7 +6308,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6445,7 +6446,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6875,37 +6876,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -6922,28 +6923,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -7006,13 +7007,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 1)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 2)))); @@ -7273,10 +7274,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7621,7 +7622,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7721,7 +7722,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8448,7 +8449,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8556,7 +8557,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8655,7 +8656,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8766,7 +8767,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l166; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8843,7 +8844,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9033,7 +9034,7 @@ interpret(void) } sz = 0; l184: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9083,7 +9084,7 @@ interpret(void) } sz = 0; l183: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9675,7 +9676,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9775,7 +9776,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10501,7 +10502,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10609,7 +10610,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10708,7 +10709,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10819,7 +10820,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l291; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10896,7 +10897,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11064,7 +11065,7 @@ interpret(void) } sz = 0; l309: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11114,7 +11115,7 @@ interpret(void) } sz = 0; l308: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11445,7 +11446,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11640,7 +11641,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l343; } if (index == InstructionPointerIndex) { @@ -11809,7 +11810,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } break; case 489: /*233*/ @@ -12202,7 +12203,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12270,7 +12271,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12443,7 +12444,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12510,7 +12511,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12756,37 +12757,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -12803,28 +12804,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -12887,13 +12888,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 1)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 2)))); @@ -13090,7 +13091,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13203,10 +13204,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13365,7 +13366,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l426; } if (slotIndex == InstructionPointerIndex) { @@ -13543,7 +13544,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13732,7 +13733,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14178,7 +14179,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14304,7 +14305,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14401,7 +14402,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14414,7 +14415,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15108,7 +15109,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16775,7 +16776,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17015,15 +17016,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -17398,7 +17399,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18347,7 +18348,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19144,7 +19145,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19669,7 +19670,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -19790,7 +19791,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -19799,10 +19800,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -19846,6 +19847,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -20414,7 +20416,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -20631,12 +20633,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -20670,7 +20672,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21228,7 +21230,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -21424,7 +21426,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -21662,7 +21664,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21886,7 +21888,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21979,83 +21981,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22078,14 +22011,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -22431,7 +22364,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -22845,7 +22778,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -23354,7 +23287,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -23733,7 +23666,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -23745,7 +23678,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25031,7 +24964,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -25148,7 +25081,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25425,7 +25358,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -25539,6 +25472,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -25547,7 +25559,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -25592,14 +25604,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -25620,7 +25632,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26098,11 +26110,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26191,7 +26203,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -26707,7 +26719,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26749,10 +26761,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26760,7 +26772,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26775,28 +26787,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26809,10 +26821,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26820,7 +26832,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26835,28 +26847,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26927,10 +26939,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26938,7 +26950,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26953,28 +26965,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26987,10 +26999,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26998,7 +27010,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27013,28 +27025,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27135,7 +27147,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -27302,10 +27314,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27313,7 +27325,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27328,28 +27340,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27361,10 +27373,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27372,7 +27384,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27387,28 +27399,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27492,7 +27504,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -27806,7 +27818,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -27927,7 +27939,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -27946,7 +27958,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29046,7 +29058,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -29259,7 +29271,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29322,7 +29334,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29586,7 +29598,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -30965,7 +30977,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31169,7 +31181,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31223,7 +31235,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31427,7 +31439,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31477,7 +31489,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31718,7 +31730,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31866,10 +31878,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31887,7 +31899,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31926,7 +31938,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31944,7 +31956,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -32077,10 +32089,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32200,7 +32212,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32365,7 +32377,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32394,7 +32406,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32610,7 +32622,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -32705,7 +32717,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32747,7 +32759,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32755,10 +32767,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32788,28 +32804,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32849,7 +32865,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33046,7 +33062,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33076,7 +33092,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33545,7 +33561,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -33574,7 +33590,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33590,7 +33606,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33607,7 +33623,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33688,7 +33704,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -33776,10 +33792,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33847,7 +33863,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -34173,7 +34189,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34219,7 +34235,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34227,7 +34243,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34430,7 +34446,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34777,7 +34793,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35304,7 +35320,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -35611,7 +35627,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35623,7 +35639,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35672,7 +35688,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35684,7 +35700,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35711,7 +35727,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35723,7 +35739,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35758,7 +35774,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35854,10 +35870,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36313,7 +36329,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -36469,7 +36485,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36524,7 +36540,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36767,7 +36783,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -36855,7 +36871,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37209,11 +37225,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37309,7 +37325,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37778,7 +37794,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38046,7 +38062,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38330,7 +38346,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38385,7 +38401,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38472,7 +38488,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -38503,20 +38519,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -38581,14 +38597,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38597,7 +38613,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39935,9 +39951,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -42649,7 +42665,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -42958,7 +42974,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -48753,7 +48769,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -52133,7 +52149,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -52197,7 +52213,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -52667,7 +52683,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt chunkBytes; + usqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -56147,7 +56163,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57604,7 +57620,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58422,7 +58438,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58443,7 +58459,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -58572,7 +58588,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58753,7 +58769,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt address; + usqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -59041,7 +59057,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -59361,7 +59377,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -60014,7 +60030,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -60635,7 +60651,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61782,7 +61798,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -61942,7 +61958,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63410,7 +63426,7 @@ isOptimizedMethod(sqInt methodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -64013,7 +64029,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -64819,10 +64835,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -65261,7 +65277,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -65597,7 +65613,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -65826,7 +65842,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -66945,7 +66961,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68187,7 +68203,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -68664,7 +68680,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -68691,11 +68707,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -69072,7 +69088,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -69614,6 +69630,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -69627,13 +69644,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70029,7 +70051,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70133,7 +70155,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70187,8 +70209,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70198,7 +70220,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70221,8 +70243,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -70676,7 +70698,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -70695,16 +70717,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -70718,25 +70740,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -70744,7 +70766,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -70887,10 +70909,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -70968,7 +70990,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -71128,7 +71150,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -72019,11 +72041,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72168,11 +72190,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72294,8 +72316,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -72729,7 +72751,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -73163,7 +73185,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73173,7 +73195,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73232,7 +73254,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -73607,12 +73629,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -73848,7 +73870,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -73857,7 +73879,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -73897,7 +73919,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -73997,11 +74019,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74079,7 +74101,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -74746,7 +74768,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -74761,7 +74783,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -74788,9 +74810,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -74799,9 +74821,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -74810,7 +74832,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -74822,7 +74844,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -74911,7 +74933,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -74945,7 +74967,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75014,7 +75036,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75022,7 +75044,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75041,7 +75063,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75049,7 +75071,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75060,12 +75082,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75077,7 +75099,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75195,7 +75217,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -75381,17 +75403,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75400,7 +75422,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -75427,80 +75449,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -75510,7 +75532,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75520,15 +75542,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75650,17 +75672,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75684,15 +75706,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -75736,22 +75758,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -75763,43 +75785,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -75807,37 +75829,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -75846,7 +75868,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75855,14 +75877,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -75897,15 +75919,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -75915,13 +75937,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -75973,7 +75995,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -75984,13 +76006,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -75999,7 +76021,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76010,7 +76032,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76019,7 +76041,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76027,7 +76049,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76036,7 +76058,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76044,7 +76066,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76067,7 +76089,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spursistasrc/vm/cointerp.h b/spursistasrc/vm/cointerp.h index 7c3cbe3689..b46cb53f25 100644 --- a/spursistasrc/vm/cointerp.h +++ b/spursistasrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -84,7 +84,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -328,8 +328,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -353,7 +353,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/spursistasrc/vm/gcc3x-cointerp.c b/spursistasrc/vm/gcc3x-cointerp.c index bd69fcceb6..41520caa13 100644 --- a/spursistasrc/vm/gcc3x-cointerp.c +++ b/spursistasrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -552,7 +552,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -651,7 +651,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -848,7 +849,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1440,7 +1441,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1489,7 +1490,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1534,8 +1535,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1759,7 +1760,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1767,12 +1768,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1815,7 +1816,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2436,7 +2437,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2567,7 +2568,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4475,7 +4476,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5466,7 +5467,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5532,7 +5533,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5598,7 +5599,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5664,7 +5665,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5906,7 +5907,7 @@ interpret(void) l495: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5932,7 +5933,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l497; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l497: /* end internalQuickPrimitiveResponse */; goto l494; } @@ -6072,7 +6073,7 @@ interpret(void) goto l489; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l489: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6242,7 +6243,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6316,7 +6317,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6454,7 +6455,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6884,37 +6885,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -6931,28 +6932,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -7015,13 +7016,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 1)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 2)))); @@ -7282,10 +7283,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7630,7 +7631,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7730,7 +7731,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8457,7 +8458,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8565,7 +8566,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8664,7 +8665,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8775,7 +8776,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l166; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8852,7 +8853,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9042,7 +9043,7 @@ interpret(void) } sz = 0; l184: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9092,7 +9093,7 @@ interpret(void) } sz = 0; l183: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9684,7 +9685,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9784,7 +9785,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10510,7 +10511,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10618,7 +10619,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10717,7 +10718,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10828,7 +10829,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l291; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10905,7 +10906,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11073,7 +11074,7 @@ interpret(void) } sz = 0; l309: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11123,7 +11124,7 @@ interpret(void) } sz = 0; l308: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11454,7 +11455,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11649,7 +11650,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l343; } if (index == InstructionPointerIndex) { @@ -11818,7 +11819,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } BREAK; CASE(489) /*233*/ @@ -12211,7 +12212,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12279,7 +12280,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12452,7 +12453,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12519,7 +12520,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12765,37 +12766,37 @@ interpret(void) switch (prim - 2000) { case 0: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 1: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 2: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 3: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 4: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 5: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -12812,28 +12813,28 @@ interpret(void) : (0 - rcvr) / (0 - arg))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 16: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 17: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 18: - result1 = ((((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + result1 = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); break; case 19: - result1 = ((((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + result1 = (((usqInt)((((((longAtPointer(localSP)) >> 1)) < 0) ? ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) >> -(((longAtPointer(localSP)) >> 1))) : ((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); /* begin internalPop: */ localSP += 1 * BytesPerOop; longAtPointerput(localSP, result1); @@ -12896,13 +12897,13 @@ interpret(void) result1 = byteAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + ((((longAtPointer(localSP)) >> 1)) - 1)); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 66: result1 = shortAt(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 1)))); /* begin internalPop: */ localSP += 1 * BytesPerOop; - longAtPointerput(localSP, ((result1 << 1) | 1)); + longAtPointerput(localSP, (((usqInt)result1 << 1) | 1)); break; case 67: result1 = long32At(((longAtPointer(localSP + (1 * BytesPerOop))) + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP)) >> 1)) - 1)) << 2)))); @@ -13099,7 +13100,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13212,10 +13213,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -13374,7 +13375,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l426; } if (slotIndex == InstructionPointerIndex) { @@ -13552,7 +13553,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13741,7 +13742,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14187,7 +14188,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14313,7 +14314,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -14410,7 +14411,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -14423,7 +14424,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -15117,7 +15118,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16784,7 +16785,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -17024,15 +17025,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -17407,7 +17408,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -18356,7 +18357,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -19153,7 +19154,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -19678,7 +19679,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -19799,7 +19800,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -19808,10 +19809,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -19855,6 +19856,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -20423,7 +20425,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -20640,12 +20642,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -20679,7 +20681,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -21237,7 +21239,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -21433,7 +21435,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -21671,7 +21673,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21895,7 +21897,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21988,83 +21990,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -22087,14 +22020,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -22440,7 +22373,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -22854,7 +22787,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -23363,7 +23296,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -23742,7 +23675,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -23754,7 +23687,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25040,7 +24973,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -25157,7 +25090,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -25434,7 +25367,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -25548,6 +25481,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -25556,7 +25568,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -25601,14 +25613,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -25629,7 +25641,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26107,11 +26119,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -26200,7 +26212,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -26716,7 +26728,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26758,10 +26770,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26769,7 +26781,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26784,28 +26796,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26818,10 +26830,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -26829,7 +26841,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26844,28 +26856,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26936,10 +26948,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -26947,7 +26959,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26962,28 +26974,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26996,10 +27008,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -27007,7 +27019,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27022,28 +27034,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27144,7 +27156,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -27311,10 +27323,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -27322,7 +27334,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27337,28 +27349,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -27370,10 +27382,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -27381,7 +27393,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -27396,28 +27408,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -27501,7 +27513,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -27815,7 +27827,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -27936,7 +27948,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -27955,7 +27967,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -29055,7 +29067,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -29268,7 +29280,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29331,7 +29343,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29595,7 +29607,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -30974,7 +30986,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31178,7 +31190,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31232,7 +31244,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31436,7 +31448,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31486,7 +31498,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31727,7 +31739,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31875,10 +31887,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -31896,7 +31908,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31935,7 +31947,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -31953,7 +31965,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -32086,10 +32098,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -32209,7 +32221,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32374,7 +32386,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -32403,7 +32415,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32619,7 +32631,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -32714,7 +32726,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32756,7 +32768,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -32764,10 +32776,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -32797,28 +32813,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -32858,7 +32874,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -33055,7 +33071,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33085,7 +33101,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -33554,7 +33570,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -33583,7 +33599,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -33599,7 +33615,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -33616,7 +33632,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33697,7 +33713,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -33785,10 +33801,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -33856,7 +33872,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -34182,7 +34198,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -34228,7 +34244,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -34236,7 +34252,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -34439,7 +34455,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34786,7 +34802,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -35313,7 +35329,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -35620,7 +35636,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35632,7 +35648,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35681,7 +35697,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35693,7 +35709,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35720,7 +35736,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -35732,7 +35748,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -35767,7 +35783,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -35863,10 +35879,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -36322,7 +36338,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -36478,7 +36494,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36533,7 +36549,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -36776,7 +36792,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -36864,7 +36880,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -37218,11 +37234,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -37318,7 +37334,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -37787,7 +37803,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38055,7 +38071,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -38339,7 +38355,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38394,7 +38410,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -38481,7 +38497,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -38512,20 +38528,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -38590,14 +38606,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -38606,7 +38622,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -39944,9 +39960,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -42658,7 +42674,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -42967,7 +42983,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -48762,7 +48778,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -52142,7 +52158,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -52206,7 +52222,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -52676,7 +52692,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt chunkBytes; + usqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -56156,7 +56172,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -57613,7 +57629,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -58431,7 +58447,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -58452,7 +58468,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -58581,7 +58597,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58762,7 +58778,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt address; + usqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -59050,7 +59066,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -59370,7 +59386,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -60023,7 +60039,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -60644,7 +60660,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -61791,7 +61807,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -61951,7 +61967,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -63419,7 +63435,7 @@ isOptimizedMethod(sqInt methodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -64022,7 +64038,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -64828,10 +64844,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -65270,7 +65286,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -65606,7 +65622,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -65835,7 +65851,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -66954,7 +66970,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -68196,7 +68212,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -68673,7 +68689,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -68700,11 +68716,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -69081,7 +69097,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -69623,6 +69639,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -69636,13 +69653,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -70038,7 +70060,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -70142,7 +70164,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -70196,8 +70218,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -70207,7 +70229,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -70230,8 +70252,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -70685,7 +70707,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -70704,16 +70726,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -70727,25 +70749,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -70753,7 +70775,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -70896,10 +70918,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -70977,7 +70999,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -71137,7 +71159,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -72028,11 +72050,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -72177,11 +72199,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72303,8 +72325,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -72738,7 +72760,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -73172,7 +73194,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -73182,7 +73204,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -73241,7 +73263,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -73616,12 +73638,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -73857,7 +73879,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -73866,7 +73888,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -73906,7 +73928,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -74006,11 +74028,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -74088,7 +74110,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -74755,7 +74777,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -74770,7 +74792,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -74797,9 +74819,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -74808,9 +74830,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -74819,7 +74841,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -74831,7 +74853,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -74920,7 +74942,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -74954,7 +74976,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -75023,7 +75045,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -75031,7 +75053,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -75050,7 +75072,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -75058,7 +75080,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75069,12 +75091,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75086,7 +75108,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -75204,7 +75226,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -75390,17 +75412,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75409,7 +75431,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -75436,80 +75458,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -75519,7 +75541,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75529,15 +75551,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75659,17 +75681,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75693,15 +75715,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -75745,22 +75767,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -75772,43 +75794,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -75816,37 +75838,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -75855,7 +75877,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -75864,14 +75886,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -75906,15 +75928,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -75924,13 +75946,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -75982,7 +76004,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -75993,13 +76015,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -76008,7 +76030,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -76019,7 +76041,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76028,7 +76050,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76036,7 +76058,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76045,7 +76067,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -76053,7 +76075,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -76076,7 +76098,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spursistasrc/vm/vmCallback.h b/spursistasrc/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/spursistasrc/vm/vmCallback.h +++ b/spursistasrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/spursrc/vm/cogit.h b/spursrc/vm/cogit.h index 363edec3aa..22609a432d 100644 --- a/spursrc/vm/cogit.h +++ b/spursrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -117,15 +117,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/spursrc/vm/cogitARMv5.c b/spursrc/vm/cogitARMv5.c index fa66b3642c..64690a7152 100644 --- a/spursrc/vm/cogitARMv5.c +++ b/spursrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -323,10 +323,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [5]; + usqIntptr_t machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -442,7 +442,7 @@ static sqInt NoDbgRegParms isAnInstruction(AbstractInstruction * self_in_isAnIns static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -501,7 +501,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms inverseOpcodeFor(AbstractInstruction * self_in_inverseOpcodeFor, sqInt armOpcode); static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); -static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand); +static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCRelativeValueLoad(AbstractInstruction * self_in_isPCRelativeValueLoad, unsigned int instr); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -720,7 +720,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -985,7 +985,7 @@ static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmp static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral); static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static usqInt NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms literalLoadInstructionBytes(AbstractInstruction * self_in_literalLoadInstructionBytes); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); @@ -1283,7 +1283,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1291,9 +1291,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1328,7 +1328,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1347,7 +1347,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1907,7 +1907,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1978,10 +1978,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2234,7 +2234,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2837,8 +2837,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - unsigned long hiReg; - unsigned long loReg; + usqIntptr_t hiReg; + usqIntptr_t loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2904,7 +2904,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - unsigned long flags; + usqIntptr_t flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2934,8 +2934,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - unsigned long srcA; - unsigned long srcB; + usqIntptr_t srcA; + usqIntptr_t srcB; /* NOTE: srcB contains the other mutiplicand at this point. It is OK to use it as the destination for the low part of the result and in fact this saves us moving it later */ @@ -2988,7 +2988,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3117,54 +3117,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord81; sqInt aWord82; sqInt aWord9; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; - unsigned long baseReg2; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; + usqIntptr_t baseReg2; sqInt constant; - unsigned long constant1; - unsigned long constant10; - unsigned long constant11; - unsigned long constant12; - unsigned long constant13; - unsigned long constant14; - unsigned long constant2; - unsigned long constant3; - unsigned long constant4; - unsigned long constant5; - unsigned long constant6; - unsigned long constant7; - unsigned long constant8; - unsigned long constant9; + usqIntptr_t constant1; + usqIntptr_t constant10; + usqIntptr_t constant11; + usqIntptr_t constant12; + usqIntptr_t constant13; + usqIntptr_t constant14; + usqIntptr_t constant2; + usqIntptr_t constant3; + usqIntptr_t constant4; + usqIntptr_t constant5; + usqIntptr_t constant6; + usqIntptr_t constant7; + usqIntptr_t constant8; + usqIntptr_t constant9; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destAddr; - unsigned long destAddr1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destAddr; + usqIntptr_t destAddr1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt distance2; - unsigned long distReg; - unsigned long distReg1; - unsigned long distReg2; - unsigned long dstReg; - unsigned long dstReg1; + usqIntptr_t distReg; + usqIntptr_t distReg1; + usqIntptr_t distReg2; + usqIntptr_t dstReg; + usqIntptr_t dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode2; @@ -3173,7 +3173,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode5; sqInt flagsOrOpcode6; sqInt flagsOrOpcode7; - unsigned long fpReg; + usqIntptr_t fpReg; sqInt hb; sqInt hb1; sqInt hb2; @@ -3219,10 +3219,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3323,7 +3323,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -3339,84 +3339,84 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset31; sqInt offset32; sqInt offset33; - long offset4; + sqIntptr_t offset4; sqInt offset5; sqInt offset6; - long offset7; + sqIntptr_t offset7; sqInt offset8; sqInt offset9; sqInt p; - unsigned long rd; - unsigned long rd1; - unsigned long rd10; - unsigned long rd11; - unsigned long rd12; - unsigned long rd13; - unsigned long rd14; - unsigned long rd15; - unsigned long rd16; - unsigned long rd17; - unsigned long rd18; - unsigned long rd19; - unsigned long rd2; - unsigned long rd20; - unsigned long rd21; - unsigned long rd22; - unsigned long rd23; - unsigned long rd24; - unsigned long rd3; - unsigned long rd4; - unsigned long rd5; - unsigned long rd6; - unsigned long rd7; - unsigned long rd8; - unsigned long rd9; - unsigned long reg; - unsigned long reg1; - unsigned long reg2; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long regA; - unsigned long regB; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long rn; - unsigned long rn1; - unsigned long rn10; - unsigned long rn11; - unsigned long rn12; - unsigned long rn13; - unsigned long rn14; - unsigned long rn15; - unsigned long rn16; - unsigned long rn17; - unsigned long rn18; - unsigned long rn19; - unsigned long rn2; - unsigned long rn20; - unsigned long rn21; - unsigned long rn22; - unsigned long rn23; - unsigned long rn24; - unsigned long rn25; - unsigned long rn26; - unsigned long rn3; - unsigned long rn4; - unsigned long rn5; - unsigned long rn6; - unsigned long rn7; - unsigned long rn8; - unsigned long rn9; + usqIntptr_t rd; + usqIntptr_t rd1; + usqIntptr_t rd10; + usqIntptr_t rd11; + usqIntptr_t rd12; + usqIntptr_t rd13; + usqIntptr_t rd14; + usqIntptr_t rd15; + usqIntptr_t rd16; + usqIntptr_t rd17; + usqIntptr_t rd18; + usqIntptr_t rd19; + usqIntptr_t rd2; + usqIntptr_t rd20; + usqIntptr_t rd21; + usqIntptr_t rd22; + usqIntptr_t rd23; + usqIntptr_t rd24; + usqIntptr_t rd3; + usqIntptr_t rd4; + usqIntptr_t rd5; + usqIntptr_t rd6; + usqIntptr_t rd7; + usqIntptr_t rd8; + usqIntptr_t rd9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg2; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t regA; + usqIntptr_t regB; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t rn; + usqIntptr_t rn1; + usqIntptr_t rn10; + usqIntptr_t rn11; + usqIntptr_t rn12; + usqIntptr_t rn13; + usqIntptr_t rn14; + usqIntptr_t rn15; + usqIntptr_t rn16; + usqIntptr_t rn17; + usqIntptr_t rn18; + usqIntptr_t rn19; + usqIntptr_t rn2; + usqIntptr_t rn20; + usqIntptr_t rn21; + usqIntptr_t rn22; + usqIntptr_t rn23; + usqIntptr_t rn24; + usqIntptr_t rn25; + usqIntptr_t rn26; + usqIntptr_t rn3; + usqIntptr_t rn4; + usqIntptr_t rn5; + usqIntptr_t rn6; + usqIntptr_t rn7; + usqIntptr_t rn8; + usqIntptr_t rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3431,30 +3431,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - unsigned long src; - unsigned long src1; - unsigned long srcAddr; - unsigned long srcAddr1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg16; - unsigned long srcReg17; - unsigned long srcReg18; - unsigned long srcReg19; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcAddr; + usqIntptr_t srcAddr1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg16; + usqIntptr_t srcReg17; + usqIntptr_t srcReg18; + usqIntptr_t srcReg19; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt u; int u1; sqInt u2; @@ -3463,14 +3463,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - long val; - long val1; - unsigned long val2; - long val3; - long val4; - long val5; - long val6; - long val7; + sqIntptr_t val; + sqIntptr_t val1; + usqIntptr_t val2; + sqIntptr_t val3; + sqIntptr_t val4; + sqIntptr_t val5; + sqIntptr_t val6; + sqIntptr_t val7; sqInt value; unsigned int value1; unsigned int value2; @@ -3479,9 +3479,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value5; unsigned int value6; sqInt word; - unsigned long word1; + usqIntptr_t word1; sqInt word2; - unsigned long word3; + usqIntptr_t word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -3547,11 +3547,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget = jumpTarget1; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord43 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord43; instrOffset6 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3581,11 +3581,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget2 = jumpTarget11; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord44 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord44; instrOffset7 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4102,11 +4102,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd2 = rn4; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord45 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord45; instrOffset8 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4200,7 +4200,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val5 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val5) { rot11 = 32 - i13; - immediate14 = (((usqInt) val5) >> i13) | ((((long)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val5) >> i13) | ((((sqIntptr_t)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord46 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn5 << 16) | (rd3 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord46; @@ -4233,11 +4233,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd22 = rn24; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord80 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord80; instrOffset27 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4317,11 +4317,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd4 = rn6; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord47 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord47; instrOffset9 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4405,11 +4405,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd5 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord48 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord48; instrOffset10 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4444,7 +4444,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val6 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val6) { rot12 = 32 - i14; - immediate15 = (((usqInt) val6) >> i14) | ((((long)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); + immediate15 = (((usqInt) val6) >> i14) | ((((sqIntptr_t)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord49 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn8 << 16) | (rd6 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot12) >> 1)) << 8))) | immediate15) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord49; @@ -4477,11 +4477,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd23 = rn25; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord81 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord81; instrOffset28 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4556,11 +4556,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd7 = rn9; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord50 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord50; instrOffset11 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4608,11 +4608,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd8 = rn10; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord51 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord51; instrOffset12 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4706,7 +4706,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i15 = 2; i15 <= 30; i15 += 2) { if ((val7 & (((0xFFU << i15) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i15)))) == val7) { rot13 = 32 - i15; - immediate16 = (((usqInt) val7) >> i15) | ((((long)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); + immediate16 = (((usqInt) val7) >> i15) | ((((sqIntptr_t)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord52 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd9 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate16) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord52; @@ -4739,11 +4739,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd24 = rn26; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord82 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord82; instrOffset29 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4767,11 +4767,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd10 = rn12; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord53 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord53; instrOffset13 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4787,11 +4787,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd11 = rn13; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord54 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord54; instrOffset14 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4807,11 +4807,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd12 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord55 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord55; instrOffset15 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4827,11 +4827,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd13 = rn15; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord56 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord56; instrOffset16 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4847,11 +4847,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd14 = rn16; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord57 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord57; instrOffset17 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4867,11 +4867,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd15 = rn17; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord58 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord58; instrOffset18 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5031,11 +5031,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord36 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord36; instrOffset = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5235,11 +5235,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord213 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord213; instrOffset19 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5264,11 +5264,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord214 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord214; instrOffset20 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5293,11 +5293,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord215 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord215; instrOffset21 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5322,11 +5322,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord216 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord216; instrOffset22 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5377,11 +5377,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord310 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord310; instrOffset23 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5438,11 +5438,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord311 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord311; instrOffset24 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5499,11 +5499,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord312 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord312; instrOffset25 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5549,11 +5549,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord38 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord38; instrOffset1 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5609,11 +5609,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord39 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord39; instrOffset2 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5720,11 +5720,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord40 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord40; instrOffset3 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5811,11 +5811,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord41 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord41; instrOffset4 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); @@ -5894,11 +5894,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord220 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord220; instrOffset26 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -6453,7 +6453,7 @@ isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, s /* CogARMCompiler>>#isInImmediateJumpRange: */ static sqInt NoDbgRegParms -isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand) +isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand) { return (((((int) operand)) >= -33554432) && ((((int) operand)) <= 0x1FFFFFC)); } @@ -6624,11 +6624,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - unsigned long distance; + usqIntptr_t distance; sqInt i; sqInt immediate; sqInt negate; - unsigned long operand; + usqIntptr_t operand; sqInt rot; sqInt value; @@ -6678,11 +6678,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_loadCwInto->dependent))->address))); - assert((abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord1 = ldrrnplusimm(self_in_loadCwInto, destReg, PC, (((((self_in_loadCwInto->dependent))->address)) >= (((self_in_loadCwInto->address)) + 8) ? 1 - : 0), abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); + : 0), SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); ((self_in_loadCwInto->machineCode))[0 / 4] = aWord1; return ((usqInt) (((self_in_loadCwInto->machineCodeSize) = 4))); } @@ -8653,7 +8653,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca sqInt address; usqInt addressFollowingJump; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8878,9 +8878,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -9128,7 +9128,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -9574,8 +9574,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9619,8 +9619,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -9689,7 +9689,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10649,8 +10649,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) sqInt address1; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -10724,7 +10724,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10732,7 +10732,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10826,7 +10826,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10875,7 +10875,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10972,14 +10972,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + sqInt location; + sqInt mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -11042,9 +11042,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -11136,9 +11136,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -11170,8 +11170,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -11190,7 +11190,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -11199,7 +11199,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -11733,9 +11733,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -11764,7 +11764,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -12116,7 +12116,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -17461,7 +17461,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17498,7 +17498,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17969,7 +17969,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction4 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); if (usesOutOfLineLiteral(anInstruction4)) { @@ -17986,7 +17986,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18022,7 +18022,7 @@ genPrimitiveNewWithArg(void) } /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18934,7 +18934,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -19237,7 +19237,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn (anInstruction8->dependent = locateLiteral(offset1)); } /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); if (usesOutOfLineLiteral(anInstruction9)) { @@ -20553,7 +20553,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction6->dependent = locateLiteral(offset)); } /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction7 = genoperandoperand(MoveCqR, quickConstant3, TempReg); if (usesOutOfLineLiteral(anInstruction7)) { @@ -20567,7 +20567,7 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq (anInstruction8->dependent = locateLiteral(offset1)); } /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant4, TempReg); if (usesOutOfLineLiteral(anInstruction9)) { @@ -20708,7 +20708,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); if (usesOutOfLineLiteral(anInstruction)) { @@ -20722,9 +20722,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); if (usesOutOfLineLiteral(anInstruction2)) { @@ -20748,7 +20748,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -21526,7 +21526,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - unsigned long literal; + usqIntptr_t literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -21580,7 +21580,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) */ /* CogOutOfLineLiteralsARMCompiler>>#isSharable */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable) { assert(((self_in_isSharable->opcode)) == Literal); @@ -21784,7 +21784,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -22776,7 +22776,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -22794,7 +22794,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ checkLiteralforInstruction(address10, genoperandoperand(MoveRAw, TempReg, address10)); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget1, genoperand(CallFull, callTarget1)); @@ -23330,7 +23330,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -23832,7 +23832,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -23880,7 +23880,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -23897,7 +23897,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -23941,7 +23941,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -24361,15 +24361,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -24594,9 +24594,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -24614,17 +24614,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -24634,7 +24634,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -24893,7 +24893,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25689,12 +25689,12 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -25755,13 +25755,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -27369,7 +27369,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -27456,7 +27456,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -28041,7 +28041,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursrc/vm/cogitIA32.c b/spursrc/vm/cogitIA32.c index d8e7432a97..f6b7dd0193 100644 --- a/spursrc/vm/cogitIA32.c +++ b/spursrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -340,8 +340,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -457,7 +457,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -513,7 +513,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); static sqInt NoDbgRegParms jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize); @@ -709,7 +709,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1246,7 +1246,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1254,9 +1254,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1291,7 +1291,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1310,7 +1310,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1866,7 +1866,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1935,10 +1935,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2198,7 +2198,7 @@ isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2748,7 +2748,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2762,7 +2762,7 @@ computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -2776,8 +2776,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2790,8 +2790,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2808,8 +2808,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2853,41 +2853,41 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2954,14 +2954,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - unsigned long mask; - unsigned long mask1; - unsigned long mask2; + usqIntptr_t mask; + usqIntptr_t mask1; + usqIntptr_t mask2; sqInt mcIdx; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -2972,7 +2972,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - unsigned long offset12; + usqIntptr_t offset12; sqInt offset120; sqInt offset121; sqInt offset122; @@ -2984,7 +2984,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -2995,108 +2995,108 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; - unsigned long offset9; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg24; - unsigned long reg25; - unsigned long reg26; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS10; - unsigned long regLHS11; - unsigned long regLHS12; - unsigned long regLHS13; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regLHS5; - unsigned long regLHS6; - unsigned long regLHS7; - unsigned long regLHS8; - unsigned long regLHS9; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS10; - unsigned long regRHS11; - unsigned long regRHS12; - unsigned long regRHS13; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regRHS5; - unsigned long regRHS6; - unsigned long regRHS7; - unsigned long regRHS8; - unsigned long regRHS9; - unsigned long regToShift; - unsigned long regToShift1; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; + usqIntptr_t offset9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg24; + usqIntptr_t reg25; + usqIntptr_t reg26; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS10; + usqIntptr_t regLHS11; + usqIntptr_t regLHS12; + usqIntptr_t regLHS13; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regLHS5; + usqIntptr_t regLHS6; + usqIntptr_t regLHS7; + usqIntptr_t regLHS8; + usqIntptr_t regLHS9; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS10; + usqIntptr_t regRHS11; + usqIntptr_t regRHS12; + usqIntptr_t regRHS13; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regRHS5; + usqIntptr_t regRHS6; + usqIntptr_t regRHS7; + usqIntptr_t regRHS8; + usqIntptr_t regRHS9; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; sqInt shiftCount; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt swapreg; - unsigned long value; - unsigned long value1; - unsigned long value10; - unsigned long value11; - unsigned long value12; - unsigned long value13; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long value9; - unsigned long word; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value10; + usqIntptr_t value11; + usqIntptr_t value12; + usqIntptr_t value13; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t value9; + usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { dispatchConcretizeProcessorSpecific(self_in_dispatchConcretize); @@ -5394,25 +5394,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg2; - unsigned long destReg3; - unsigned long offset; - unsigned long offset1; - unsigned long offset2; - unsigned long offset3; - unsigned long reg; - unsigned long reg1; - unsigned long reg11; - unsigned long reg2; - unsigned long reg21; - unsigned long reg3; - unsigned long regDivisor; - unsigned long srcReg; - unsigned long srcReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t offset; + usqIntptr_t offset1; + usqIntptr_t offset2; + usqIntptr_t offset3; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg11; + usqIntptr_t reg2; + usqIntptr_t reg21; + usqIntptr_t reg3; + usqIntptr_t regDivisor; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6537,7 +6537,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) /* CogIA32Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((int) operand)) >= -128) && ((((int) operand)) <= 0x7F)); } @@ -7033,9 +7033,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -7423,7 +7423,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - usqInt end; + sqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -7467,7 +7467,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8469,7 +8469,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8693,9 +8693,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -8932,7 +8932,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -9315,8 +9315,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -9360,8 +9360,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -9430,7 +9430,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt caseEndAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -10373,8 +10373,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10433,7 +10433,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -10441,7 +10441,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10531,7 +10531,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10580,7 +10580,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10677,14 +10677,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -10742,9 +10742,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -10836,9 +10836,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -10871,8 +10871,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10892,7 +10892,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -10906,7 +10906,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -11383,12 +11383,12 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; - unsigned long fixupSize1; + usqIntptr_t fixupSize; + usqIntptr_t fixupSize1; sqInt numberOfAbstractOpcodes; sqInt numberOfAbstractOpcodes1; - unsigned long opcodeSize; - unsigned long opcodeSize1; + usqIntptr_t opcodeSize; + usqIntptr_t opcodeSize1; sqInt startAddress1; sqInt startAddress2; @@ -11413,7 +11413,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateCheckFeatures(backEnd); outputInstructionsForGeneratedRuntimeAt(startAddress2); recordGeneratedRunTimeaddress("ceCheckFeaturesFunction", startAddress2); - ceCheckFeaturesFunction = ((unsigned long (*)(void)) startAddress2); + ceCheckFeaturesFunction = ((usqIntptr_t (*)(void)) startAddress2); /* begin maybeGenerateICacheFlush */ /* begin generateVMOwnerLockFunctions */ @@ -11434,7 +11434,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -11798,7 +11798,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -12748,7 +12748,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -16957,7 +16957,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -16988,7 +16988,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -17392,7 +17392,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -17403,7 +17403,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17429,7 +17429,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -18158,7 +18158,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s { sqInt address; sqInt address1; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -18392,7 +18392,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ @@ -19405,13 +19405,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -19537,7 +19537,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -19548,9 +19548,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -19566,7 +19566,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -20765,7 +20765,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction111 = genoperand(CallFull, callTarget); abstractInstruction2 = anInstruction111; @@ -20782,7 +20782,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction112 = genoperand(CallFull, callTarget1); abstractInstruction3 = anInstruction112; @@ -21278,7 +21278,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -21761,7 +21761,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin annotateCall: */ anInstruction18 = genoperand(CallFull, callTarget); abstractInstruction = anInstruction18; @@ -21809,7 +21809,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -21826,7 +21826,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -21870,7 +21870,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -22253,7 +22253,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -22275,15 +22275,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -22504,9 +22504,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -22524,17 +22524,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -22544,7 +22544,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -22803,7 +22803,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -23576,12 +23576,12 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -23642,13 +23642,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -25186,7 +25186,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -25261,7 +25261,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -25818,7 +25818,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursrc/vm/cogitMIPSEL.c b/spursrc/vm/cogitMIPSEL.c index f480b43a08..30cc336005 100644 --- a/spursrc/vm/cogitMIPSEL.c +++ b/spursrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -368,10 +368,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [7]; + usqIntptr_t machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -484,7 +484,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -651,7 +651,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1389,7 +1389,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceCPICMissTrampoline; void (*ceEnterCogCodePopReceiverReg)(void); @@ -1397,9 +1397,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1434,7 +1434,7 @@ sqInt ceStoreTrampolines[5]; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt checkedEntryAlignment; @@ -1453,7 +1453,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -2009,7 +2009,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -2074,10 +2074,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -2329,7 +2329,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2702,7 +2702,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - sqInt end; + usqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -2746,7 +2746,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3748,7 +3748,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -3972,9 +3972,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -4219,7 +4219,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4628,8 +4628,8 @@ compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRou static void computeEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; /* begin allocateOpcodes:bytecodes: */ @@ -4673,8 +4673,8 @@ computeEntryOffsets(void) static void computeFullBlockEntryOffsets(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 24; @@ -4742,7 +4742,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -4819,7 +4819,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - usqInt entryPoint; + sqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -4919,7 +4919,7 @@ cPICHasForwardedClass(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC) { - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -5695,8 +5695,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -5766,7 +5766,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -5774,7 +5774,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -5864,7 +5864,7 @@ static CogMethod * generateCogFullBlock(void) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -5913,7 +5913,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -6010,14 +6010,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - sqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; - sqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -6075,9 +6075,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -6169,9 +6169,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -6203,8 +6203,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -6223,7 +6223,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -6232,7 +6232,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -6713,9 +6713,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -6744,7 +6744,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -7096,7 +7096,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -8045,7 +8045,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -10768,8 +10768,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -10807,8 +10807,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -10838,8 +10838,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -10860,8 +10860,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -10883,8 +10883,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -10914,8 +10914,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -10935,9 +10935,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long dstReg; - unsigned long srcReg; - unsigned long value; + usqIntptr_t dstReg; + usqIntptr_t srcReg; + usqIntptr_t value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -10962,8 +10962,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -10985,8 +10985,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -11002,7 +11002,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -11017,8 +11017,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -11053,9 +11053,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -11086,8 +11086,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -11123,8 +11123,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -11158,9 +11158,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -11190,9 +11190,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -11227,9 +11227,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -11264,9 +11264,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -11301,9 +11301,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -11338,9 +11338,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -11375,9 +11375,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -11412,9 +11412,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -11449,9 +11449,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -11557,8 +11557,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - unsigned long dividendReg; - unsigned long divisorReg; + usqIntptr_t dividendReg; + usqIntptr_t divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -11707,7 +11707,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -11808,8 +11808,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -11839,7 +11839,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -11854,8 +11854,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -11871,7 +11871,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -11886,8 +11886,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -11905,8 +11905,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -11938,8 +11938,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -11968,7 +11968,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -11988,7 +11988,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -12007,7 +12007,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12021,7 +12021,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12035,9 +12035,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -12053,9 +12053,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -12075,8 +12075,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -12111,8 +12111,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -12144,8 +12144,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -12174,9 +12174,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -12192,9 +12192,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -12210,9 +12210,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - unsigned long baseReg; + usqIntptr_t baseReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -12228,8 +12228,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -12245,9 +12245,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -12268,9 +12268,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -12293,9 +12293,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; /* index is number of *bytes* */ @@ -12318,9 +12318,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -12346,8 +12346,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -12373,7 +12373,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12397,8 +12397,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -12419,8 +12419,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -12442,8 +12442,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -12459,7 +12459,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12475,7 +12475,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -12508,7 +12508,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -12532,7 +12532,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12592,8 +12592,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -12631,8 +12631,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -12662,8 +12662,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -12684,8 +12684,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -12707,8 +12707,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -12723,8 +12723,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -12744,8 +12744,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -12777,8 +12777,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -12800,8 +12800,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -14037,9 +14037,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - unsigned long newBranchLeft; + usqIntptr_t newBranchLeft; sqInt newBranchOpcode; - unsigned long newBranchRight; + usqIntptr_t newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -14335,7 +14335,7 @@ relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeRet static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) { - usqInt newTarget; + sqInt newTarget; usqInt oldTarget; assert((delta % 4) == 0); @@ -14388,7 +14388,7 @@ relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_i static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) { - usqInt newValue; + sqInt newValue; usqInt oldValue; if (((opcodeAtAddress(self_in_relocateMethodReferenceBeforeAddressby, pc - 8)) == ADDIU) @@ -14706,7 +14706,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -16427,7 +16427,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsBytes, gCmpCqR(((0xFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsBytes, gCmpCqR((((usqInt)0xFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -16458,7 +16458,7 @@ genPrimitiveAtPut(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpIsShorts, gCmpCqR(((0xFFFF << 1) | 1), Arg1Reg)); + jmpTarget(jumpIsShorts, gCmpCqR((((usqInt)0xFFFF << 1) | 1), Arg1Reg)); /* begin JumpAbove: */ jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin LogicalShiftLeftCq:R: */ @@ -16862,7 +16862,7 @@ genPrimitiveNewWithArg(void) /* begin JumpNonZero: */ jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CmpCq:R: */ - quickConstant6 = ((maxSlots << 1) | 1); + quickConstant6 = (((usqInt)maxSlots << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction5 = genoperandoperand(CmpCqR, quickConstant6, Arg0Reg); /* begin JumpAbove: */ @@ -16873,7 +16873,7 @@ genPrimitiveNewWithArg(void) anInstruction6 = genoperand(PushCq, 0); /* begin Jump: */ jumpLongPrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpByteFormat, gCmpCqR((((maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); + jmpTarget(jumpByteFormat, gCmpCqR((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -16899,7 +16899,7 @@ genPrimitiveNewWithArg(void) anInstruction10 = genoperand(PushCq, 0); /* begin Jump: */ jumpBytePrepDone = genoperand(Jump, ((sqInt)0)); - jmpTarget(jumpArrayFormat, gCmpCqR(((maxSlots << 1) | 1), Arg0Reg)); + jmpTarget(jumpArrayFormat, gCmpCqR((((usqInt)maxSlots << 1) | 1), Arg0Reg)); /* begin JumpAbove: */ jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); /* begin MoveR:R: */ @@ -17807,7 +17807,7 @@ genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqIn /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((numArgs << 1) | 1); + quickConstant3 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ @@ -18832,13 +18832,13 @@ genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sq /* begin MoveR:Mw:r: */ anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant3 = ((bcpc << 1) | 1); + quickConstant3 = (((usqInt)bcpc << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction9 = genoperandoperand(MoveCqR, quickConstant3, TempReg); /* begin MoveR:Mw:r: */ anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg); /* begin MoveCq:R: */ - quickConstant4 = ((numArgs << 1) | 1); + quickConstant4 = (((usqInt)numArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction11 = genoperandoperand(MoveCqR, quickConstant4, TempReg); /* begin MoveR:Mw:r: */ @@ -18964,7 +18964,7 @@ genPrimitiveObjectAt(void) jumpBadIndex = genJumpNotSmallInteger(Arg0Reg); genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg); /* begin CmpCq:R: */ - quickConstant = ((1 << 1) | 1); + quickConstant = (((usqInt)1 << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, Arg0Reg); /* begin JumpNonZero: */ @@ -18975,9 +18975,9 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpNotHeaderIndex, gAndCqR((((alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); + jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg)); /* begin SubCq:R: */ - quickConstant1 = (((1 << 1) | 1)) - (smallIntegerTag()); + quickConstant1 = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag()); /* begin gen:quickConstant:operand: */ anInstruction2 = genoperandoperand(SubCqR, quickConstant1, Arg0Reg); /* begin CmpR:R: */ @@ -18993,7 +18993,7 @@ genPrimitiveObjectAt(void) assert(methodOrBlockNumArgs <= (numRegArgs())); /* begin RetN: */ genoperand(RetN, 0); - jmpTarget(jumpBounds, gAddCqR((((1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); + jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg)); jmpTarget(jumpBadIndex, gLabel()); return CompletePrimitive; } @@ -20187,7 +20187,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -20202,7 +20202,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -20681,7 +20681,7 @@ genExtPushIntegerBytecode(void) value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; - return genPushLiteral(((value << 1) | 1)); + return genPushLiteral((((usqInt)value << 1) | 1)); } @@ -21173,7 +21173,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -21221,7 +21221,7 @@ genPushConstantNilBytecode(void) static sqInt genPushConstantOneBytecode(void) { - return genPushLiteral(((1 << 1) | 1)); + return genPushLiteral((((usqInt)1 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */ @@ -21238,7 +21238,7 @@ genPushConstantTrueBytecode(void) static sqInt genPushConstantZeroBytecode(void) { - return genPushLiteral(((0 << 1) | 1)); + return genPushLiteral((((usqInt)0 << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */ @@ -21282,7 +21282,7 @@ genPushLitVarDirSup16CasesBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -21665,7 +21665,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -21687,15 +21687,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -21916,9 +21916,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -21936,17 +21936,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -21956,7 +21956,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -22215,7 +22215,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -22985,12 +22985,12 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied) { - unsigned long allocBytes; - unsigned long fixupBytes; + usqIntptr_t allocBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -23051,13 +23051,13 @@ compileCogFullBlockMethod(sqInt numCopied) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -24615,7 +24615,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -24690,7 +24690,7 @@ genPrimitiveFullClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -25247,7 +25247,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/spursrc/vm/cointerp.c b/spursrc/vm/cointerp.c index 02b34d4276..d7a0305626 100644 --- a/spursrc/vm/cointerp.c +++ b/spursrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -545,7 +545,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -641,7 +641,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -838,7 +839,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1428,7 +1429,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1477,7 +1478,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1522,8 +1523,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1747,7 +1748,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1755,12 +1756,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1803,7 +1804,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2424,7 +2425,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2555,7 +2556,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4457,7 +4458,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5448,7 +5449,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5514,7 +5515,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5580,7 +5581,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5646,7 +5647,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5888,7 +5889,7 @@ interpret(void) l475: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5914,7 +5915,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l477; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l477: /* end internalQuickPrimitiveResponse */; goto l474; } @@ -6054,7 +6055,7 @@ interpret(void) goto l469; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l469: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6224,7 +6225,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6298,7 +6299,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6436,7 +6437,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6870,10 +6871,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7218,7 +7219,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7318,7 +7319,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8045,7 +8046,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8153,7 +8154,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8252,7 +8253,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8363,7 +8364,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l156; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8440,7 +8441,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8630,7 +8631,7 @@ interpret(void) } sz = 0; l174: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8680,7 +8681,7 @@ interpret(void) } sz = 0; l173: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9272,7 +9273,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9372,7 +9373,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10098,7 +10099,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10206,7 +10207,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10305,7 +10306,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10416,7 +10417,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l281; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10493,7 +10494,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10661,7 +10662,7 @@ interpret(void) } sz = 0; l299: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10711,7 +10712,7 @@ interpret(void) } sz = 0; l298: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11042,7 +11043,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11215,7 +11216,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l333; } if (index == InstructionPointerIndex) { @@ -11384,7 +11385,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } break; case 489: /*233*/ @@ -11777,7 +11778,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11845,7 +11846,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12018,7 +12019,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12085,7 +12086,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12271,7 +12272,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -12384,10 +12385,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -12546,7 +12547,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l406; } if (slotIndex == InstructionPointerIndex) { @@ -12724,7 +12725,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12913,7 +12914,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13362,7 +13363,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -13488,7 +13489,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -13585,7 +13586,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -13598,7 +13599,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -14292,7 +14293,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16015,15 +16016,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -16398,7 +16399,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -17347,7 +17348,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -18144,7 +18145,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -18669,7 +18670,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -18790,7 +18791,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -18799,10 +18800,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -18846,6 +18847,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -19631,12 +19633,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -19670,7 +19672,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -20228,7 +20230,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -20424,7 +20426,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -20662,7 +20664,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -20886,7 +20888,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -20979,83 +20981,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -21078,14 +21011,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -21431,7 +21364,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -21845,7 +21778,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -22327,7 +22260,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -22706,7 +22639,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -22718,7 +22651,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -23933,7 +23866,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -24050,7 +23983,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -24327,7 +24260,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -24441,6 +24374,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -24449,7 +24461,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -24494,14 +24506,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -24522,7 +24534,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25000,11 +25012,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25093,7 +25105,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -25609,7 +25621,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25651,10 +25663,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -25662,7 +25674,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25677,28 +25689,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -25711,10 +25723,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -25722,7 +25734,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25737,28 +25749,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -25829,10 +25841,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -25840,7 +25852,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25855,28 +25867,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -25889,10 +25901,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -25900,7 +25912,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25915,28 +25927,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26037,7 +26049,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -26204,10 +26216,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -26215,7 +26227,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26230,28 +26242,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26263,10 +26275,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -26274,7 +26286,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26289,28 +26301,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26394,7 +26406,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -26708,7 +26720,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -26829,7 +26841,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -26848,7 +26860,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -27948,7 +27960,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -28161,7 +28173,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28224,7 +28236,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28488,7 +28500,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29867,7 +29879,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30071,7 +30083,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30125,7 +30137,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30329,7 +30341,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30379,7 +30391,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -30620,7 +30632,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30768,10 +30780,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -30789,7 +30801,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -30828,7 +30840,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -30846,7 +30858,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -30979,10 +30991,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31102,7 +31114,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -31267,7 +31279,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -31296,7 +31308,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31441,7 +31453,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -31512,7 +31524,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -31607,7 +31619,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31649,7 +31661,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -31657,10 +31669,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -31690,28 +31706,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -31751,7 +31767,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -31948,7 +31964,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -31978,7 +31994,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -32447,7 +32463,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -32476,7 +32492,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -32492,7 +32508,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -32509,7 +32525,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32590,7 +32606,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -32678,10 +32694,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -32749,7 +32765,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -33075,7 +33091,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33121,7 +33137,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33129,7 +33145,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -33332,7 +33348,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33679,7 +33695,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -34206,7 +34222,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34513,7 +34529,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34525,7 +34541,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34574,7 +34590,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34586,7 +34602,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34613,7 +34629,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34625,7 +34641,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34660,7 +34676,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -34756,10 +34772,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -35215,7 +35231,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -35371,7 +35387,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35426,7 +35442,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35669,7 +35685,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -35757,7 +35773,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36111,11 +36127,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -36211,7 +36227,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -36680,7 +36696,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -36948,7 +36964,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -37232,7 +37248,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -37287,7 +37303,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -37374,7 +37390,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -37405,20 +37421,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -37483,14 +37499,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -37499,7 +37515,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -38837,9 +38853,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -40226,7 +40242,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - sqInt ptr; + usqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -41551,7 +41567,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -41860,7 +41876,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -47647,7 +47663,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51027,7 +51043,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -51091,7 +51107,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -55041,7 +55057,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -56498,7 +56514,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -57316,7 +57332,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -57337,7 +57353,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -57466,7 +57482,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -57935,7 +57951,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -58053,8 +58069,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -58255,7 +58271,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -58908,7 +58924,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -59529,7 +59545,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -60676,7 +60692,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -60836,7 +60852,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -62283,7 +62299,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -62886,7 +62902,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -63692,10 +63708,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -64134,7 +64150,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -64470,7 +64486,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -64699,7 +64715,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -65818,7 +65834,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -67060,7 +67076,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -67537,7 +67553,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -67564,11 +67580,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -68487,6 +68503,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -68500,13 +68517,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -68902,7 +68924,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -69006,7 +69028,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -69060,8 +69082,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -69071,7 +69093,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -69094,8 +69116,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -69549,7 +69571,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -69568,16 +69590,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -69591,25 +69613,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -69617,7 +69639,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -69760,10 +69782,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -69841,7 +69863,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -70001,7 +70023,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -70892,11 +70914,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -71041,11 +71063,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -71167,8 +71189,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -71602,7 +71624,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -72036,7 +72058,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -72046,7 +72068,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -72105,7 +72127,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -72480,12 +72502,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -72721,7 +72743,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -72730,7 +72752,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -72770,7 +72792,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -72870,11 +72892,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72952,7 +72974,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -73619,7 +73641,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -73634,7 +73656,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -73661,9 +73683,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -73672,9 +73694,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -73683,7 +73705,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -73695,7 +73717,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -73784,7 +73806,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -73818,7 +73840,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -73887,7 +73909,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -73895,7 +73917,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -73914,7 +73936,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -73922,7 +73944,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -73933,12 +73955,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -73950,7 +73972,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -74068,7 +74090,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -74254,17 +74276,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74273,7 +74295,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -74300,80 +74322,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -74383,7 +74405,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74393,15 +74415,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74523,17 +74545,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74557,15 +74579,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -74609,22 +74631,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -74636,43 +74658,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -74680,37 +74702,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -74719,7 +74741,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74728,14 +74750,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -74770,15 +74792,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -74788,13 +74810,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -74846,7 +74868,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -74857,13 +74879,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -74872,7 +74894,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -74883,7 +74905,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74892,7 +74914,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74900,7 +74922,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74909,7 +74931,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74917,7 +74939,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74940,7 +74962,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spursrc/vm/cointerp.h b/spursrc/vm/cointerp.h index 509be654fe..a545157e49 100644 --- a/spursrc/vm/cointerp.h +++ b/spursrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -82,7 +82,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -325,8 +325,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -350,7 +350,7 @@ VM_EXPORT usqInt heapBase; VM_EXPORT sqInt inIOProcessEvents; VM_EXPORT struct VirtualMachine* interpreterProxy; VM_EXPORT sqInt maxLiteralCountForCompile ; -VM_EXPORT unsigned long maxOldSpaceSize; +VM_EXPORT usqInt maxOldSpaceSize; VM_EXPORT sqInt minBackwardJumpCountForCompile ; VM_EXPORT volatile int sendTrace; VM_EXPORT void * showSurfaceFn; diff --git a/spursrc/vm/gcc3x-cointerp.c b/spursrc/vm/gcc3x-cointerp.c index d006673137..fe5bfbcaee 100644 --- a/spursrc/vm/gcc3x-cointerp.c +++ b/spursrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -548,7 +548,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -644,7 +644,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -841,7 +842,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1431,7 +1432,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1480,7 +1481,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1525,8 +1526,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1750,7 +1751,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1758,12 +1759,12 @@ _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1806,7 +1807,7 @@ sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; sqInt desiredCogCodeSize; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; char * breakSelector; usqInt heapBase; sqInt inIOProcessEvents; @@ -2427,7 +2428,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2558,7 +2559,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4466,7 +4467,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5457,7 +5458,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5523,7 +5524,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5589,7 +5590,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5655,7 +5656,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5897,7 +5898,7 @@ interpret(void) l475: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5923,7 +5924,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l477; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l477: /* end internalQuickPrimitiveResponse */; goto l474; } @@ -6063,7 +6064,7 @@ interpret(void) goto l469; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l469: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -6233,7 +6234,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l39; } if (byte3 == InstructionPointerIndex) { @@ -6307,7 +6308,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6445,7 +6446,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6879,10 +6880,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -7227,7 +7228,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7327,7 +7328,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8054,7 +8055,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -8162,7 +8163,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8261,7 +8262,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8372,7 +8373,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l156; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8449,7 +8450,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8639,7 +8640,7 @@ interpret(void) } sz = 0; l174: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8689,7 +8690,7 @@ interpret(void) } sz = 0; l173: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9281,7 +9282,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9381,7 +9382,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10107,7 +10108,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10215,7 +10216,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10314,7 +10315,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10425,7 +10426,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l281; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10502,7 +10503,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10670,7 +10671,7 @@ interpret(void) } sz = 0; l299: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10720,7 +10721,7 @@ interpret(void) } sz = 0; l298: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11051,7 +11052,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11224,7 +11225,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l333; } if (index == InstructionPointerIndex) { @@ -11393,7 +11394,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } BREAK; CASE(489) /*233*/ @@ -11786,7 +11787,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11854,7 +11855,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12027,7 +12028,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12094,7 +12095,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12280,7 +12281,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -12393,10 +12394,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -12555,7 +12556,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l406; } if (slotIndex == InstructionPointerIndex) { @@ -12733,7 +12734,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12922,7 +12923,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13371,7 +13372,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -13497,7 +13498,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -13594,7 +13595,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -13607,7 +13608,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -14301,7 +14302,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -16024,15 +16025,15 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) cogMethod) : ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset))))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -16407,7 +16408,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -17356,7 +17357,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -18153,7 +18154,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -18678,7 +18679,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -18799,7 +18800,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -18808,10 +18809,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -18855,6 +18856,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -19640,12 +19642,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -19679,7 +19681,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -20237,7 +20239,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -20433,7 +20435,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -20671,7 +20673,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -20895,7 +20897,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l2; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l2: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -20988,83 +20990,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -21087,14 +21020,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -21440,7 +21373,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -21854,7 +21787,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -22336,7 +22269,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -22715,7 +22648,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -22727,7 +22660,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -23942,7 +23875,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -24059,7 +23992,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -24336,7 +24269,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -24450,6 +24383,85 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -24458,7 +24470,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -24503,14 +24515,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -24531,7 +24543,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25009,11 +25021,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25102,7 +25114,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -25618,7 +25630,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25660,10 +25672,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -25671,7 +25683,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25686,28 +25698,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -25720,10 +25732,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -25731,7 +25743,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25746,28 +25758,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -25838,10 +25850,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -25849,7 +25861,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25864,28 +25876,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -25898,10 +25910,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -25909,7 +25921,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -25924,28 +25936,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26046,7 +26058,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -26213,10 +26225,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -26224,7 +26236,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26239,28 +26251,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -26272,10 +26284,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -26283,7 +26295,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -26298,28 +26310,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -26403,7 +26415,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -26717,7 +26729,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -26838,7 +26850,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -26857,7 +26869,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -27957,7 +27969,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -28170,7 +28182,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28233,7 +28245,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28497,7 +28509,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29876,7 +29888,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30080,7 +30092,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30134,7 +30146,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30338,7 +30350,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30388,7 +30400,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -30629,7 +30641,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30777,10 +30789,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -30798,7 +30810,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -30837,7 +30849,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -30855,7 +30867,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -30988,10 +31000,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -31111,7 +31123,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -31276,7 +31288,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -31305,7 +31317,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31450,7 +31462,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -31521,7 +31533,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -31616,7 +31628,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31658,7 +31670,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -31666,10 +31678,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -31699,28 +31715,28 @@ primitiveIntegerAtPut(void) : numSlots1); if (fmt <= 5) { sz = numSlots; - goto l1; + goto l2; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ sz = (numSlots << (shiftForWord())) - (fmt & 7); - goto l1; + goto l2; } if (fmt >= (firstShortFormat())) { sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l1; + goto l2; } if (fmt >= (firstLongFormat())) { sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l1; + goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { sz = ((usqInt) numSlots) >> 1; - goto l1; + goto l2; } sz = 0; -l1: /* end lengthOf:format: */; +l2: /* end lengthOf:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -31760,7 +31776,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -31957,7 +31973,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -31987,7 +32003,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -32456,7 +32472,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -32485,7 +32501,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -32501,7 +32517,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -32518,7 +32534,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -32599,7 +32615,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -32687,10 +32703,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -32758,7 +32774,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -33084,7 +33100,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -33130,7 +33146,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -33138,7 +33154,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -33341,7 +33357,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -33688,7 +33704,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -34215,7 +34231,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -34522,7 +34538,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34534,7 +34550,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34583,7 +34599,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34595,7 +34611,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34622,7 +34638,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -34634,7 +34650,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -34669,7 +34685,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -34765,10 +34781,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -35224,7 +35240,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -35380,7 +35396,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35435,7 +35451,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35678,7 +35694,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -35766,7 +35782,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -36120,11 +36136,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -36220,7 +36236,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -36689,7 +36705,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -36957,7 +36973,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -37241,7 +37257,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -37296,7 +37312,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -37383,7 +37399,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -37414,20 +37430,20 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -37492,14 +37508,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -37508,7 +37524,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -38846,9 +38862,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -40235,7 +40251,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - sqInt ptr; + usqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -41560,7 +41576,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -41869,7 +41885,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -47656,7 +47672,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51036,7 +51052,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -51100,7 +51116,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -55050,7 +55066,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -56507,7 +56523,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -57325,7 +57341,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -57346,7 +57362,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -57475,7 +57491,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -57944,7 +57960,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -58062,8 +58078,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); @@ -58264,7 +58280,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -58917,7 +58933,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -59538,7 +59554,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -60685,7 +60701,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -60845,7 +60861,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -62292,7 +62308,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -62895,7 +62911,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -63701,10 +63717,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -64143,7 +64159,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); @@ -64479,7 +64495,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -64708,7 +64724,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -65827,7 +65843,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -67069,7 +67085,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -67546,7 +67562,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -67573,11 +67589,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -68496,6 +68512,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -68509,13 +68526,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -68911,7 +68933,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -69015,7 +69037,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -69069,8 +69091,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -69080,7 +69102,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -69103,8 +69125,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -69558,7 +69580,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -69577,16 +69599,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -69600,25 +69622,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -69626,7 +69648,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -69769,10 +69791,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -69850,7 +69872,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -70010,7 +70032,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -70901,11 +70923,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -71050,11 +71072,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -71176,8 +71198,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -71611,7 +71633,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -72045,7 +72067,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -72055,7 +72077,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ if (recordPrimTrace()) { /* begin fastLogPrim: */ @@ -72114,7 +72136,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -72489,12 +72511,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -72730,7 +72752,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -72739,7 +72761,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -72779,7 +72801,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -72879,11 +72901,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -72961,7 +72983,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -73628,7 +73650,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -73643,7 +73665,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -73670,9 +73692,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -73681,9 +73703,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -73692,7 +73714,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -73704,7 +73726,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -73793,7 +73815,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -73827,7 +73849,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -73896,7 +73918,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -73904,7 +73926,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -73923,7 +73945,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -73931,7 +73953,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -73942,12 +73964,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -73959,7 +73981,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -74077,7 +74099,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -74263,17 +74285,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74282,7 +74304,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -74309,80 +74331,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer15 = getCogCodeSize(); assert(!(isOopForwarded(result))); @@ -74392,7 +74414,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((((((GIV(flagInterpretedMethods) + valuePointer17 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74402,15 +74424,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer18 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((rootTableCapacity()) << 1) | 1); + valuePointer19 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74532,17 +74554,17 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer28 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((((1) + ((IMMUTABILITY + valuePointer29 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((stackPageByteSize()) << 1) | 1); + valuePointer30 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74566,15 +74588,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer32 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer33 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer34 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer34); assert(paramsArraySize == 71); @@ -74618,22 +74640,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -74645,43 +74667,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -74689,37 +74711,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -74728,7 +74750,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74737,14 +74759,14 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -74779,15 +74801,15 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -74797,13 +74819,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -74855,7 +74877,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -74866,13 +74888,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -74881,7 +74903,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -74892,7 +74914,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74901,7 +74923,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74909,7 +74931,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74918,7 +74940,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -74926,7 +74948,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -74949,7 +74971,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spursrc/vm/vmCallback.h b/spursrc/vm/vmCallback.h index f5c9e05d68..6c4fdfda5e 100644 --- a/spursrc/vm/vmCallback.h +++ b/spursrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/spurstack64src/vm/gcc3x-interp.c b/spurstack64src/vm/gcc3x-interp.c index d1b0ae8098..ac19271cb7 100644 --- a/spurstack64src/vm/gcc3x-interp.c +++ b/spurstack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -373,9 +373,9 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -605,7 +605,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1150,7 +1150,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1209,7 +1208,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1260,7 +1259,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1317,8 +1316,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1546,19 +1545,19 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1596,7 +1595,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2185,7 +2184,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2292,7 +2291,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; JUMP_TABLE; @@ -4244,7 +4243,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5187,7 +5186,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5253,7 +5252,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5319,7 +5318,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5385,7 +5384,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5539,7 +5538,7 @@ interpret(void) l505: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5565,7 +5564,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l504; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l504: /* end internalQuickPrimitiveResponse */; goto l501; } @@ -5659,7 +5658,7 @@ interpret(void) goto l502; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l502: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5788,7 +5787,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5862,7 +5861,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5995,7 +5994,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6415,10 +6414,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6728,7 +6727,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6753,7 +6752,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6790,7 +6789,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -6869,7 +6868,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6894,7 +6893,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6931,7 +6930,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7031,7 +7030,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7068,7 +7067,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7212,7 +7211,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7249,7 +7248,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7383,7 +7382,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7420,7 +7419,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7515,7 +7514,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7552,7 +7551,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7644,7 +7643,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7681,7 +7680,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7773,7 +7772,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7810,7 +7809,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7895,7 +7894,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7922,7 +7921,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7959,7 +7958,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8044,7 +8043,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8070,7 +8069,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8107,7 +8106,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8175,7 +8174,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8276,7 +8275,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8312,7 +8311,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8478,7 +8477,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -8543,7 +8542,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -8604,7 +8603,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l161; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8614,7 +8613,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l161; } @@ -8641,7 +8640,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l161; } } @@ -8753,7 +8752,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -8818,7 +8817,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -9033,7 +9032,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9059,7 +9058,7 @@ interpret(void) } sz = 0; l195: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9083,7 +9082,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9109,7 +9108,7 @@ interpret(void) } sz = 0; l194: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9698,7 +9697,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9723,7 +9722,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9760,7 +9759,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9839,7 +9838,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9864,7 +9863,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9901,7 +9900,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10001,7 +10000,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10038,7 +10037,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10181,7 +10180,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10218,7 +10217,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10352,7 +10351,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10389,7 +10388,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10484,7 +10483,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10521,7 +10520,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10613,7 +10612,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10650,7 +10649,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10742,7 +10741,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10779,7 +10778,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10864,7 +10863,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10891,7 +10890,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10928,7 +10927,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11013,7 +11012,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11039,7 +11038,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11076,7 +11075,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11144,7 +11143,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11245,7 +11244,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11281,7 +11280,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11447,7 +11446,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -11512,7 +11511,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -11573,7 +11572,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l313; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -11583,7 +11582,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l313; } @@ -11610,7 +11609,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l313; } } @@ -11722,7 +11721,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -11787,7 +11786,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -12002,7 +12001,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -12028,7 +12027,7 @@ interpret(void) } sz = 0; l347: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12052,7 +12051,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -12078,7 +12077,7 @@ interpret(void) } sz = 0; l346: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12405,7 +12404,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12541,7 +12540,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l379; } if (index == InstructionPointerIndex) { @@ -12709,7 +12708,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } BREAK; CASE(489) /*233*/ @@ -13058,7 +13057,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13126,7 +13125,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13294,7 +13293,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13361,7 +13360,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13527,7 +13526,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (receiverIsOnStack) { startIndex = FullClosureReceiverIndex; @@ -13631,10 +13630,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13744,7 +13743,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l445; } if (slotIndex == InstructionPointerIndex) { @@ -13912,7 +13911,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14091,7 +14090,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14506,7 +14505,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -14624,7 +14623,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14730,22 +14729,22 @@ magnitude64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -14833,7 +14832,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14878,14 +14877,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14906,7 +14905,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15286,7 +15285,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -15366,11 +15365,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15380,7 +15379,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -15419,7 +15418,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15454,7 +15453,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -15935,7 +15934,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15977,10 +15976,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15988,7 +15987,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16003,28 +16002,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16037,10 +16036,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16048,7 +16047,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16063,28 +16062,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16155,10 +16154,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16166,7 +16165,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16181,28 +16180,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16215,10 +16214,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16226,7 +16225,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16241,28 +16240,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16356,7 +16355,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -16483,10 +16482,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -16494,7 +16493,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16509,28 +16508,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16542,10 +16541,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16553,7 +16552,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16568,28 +16567,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16673,7 +16672,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -16987,14 +16986,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -17026,7 +17025,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17045,7 +17044,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17339,7 +17338,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -17508,7 +17507,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -17540,7 +17539,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -17654,7 +17653,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -17731,7 +17730,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -17784,7 +17783,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -17820,7 +17819,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -17944,7 +17943,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18007,7 +18006,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18342,7 +18341,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18442,7 +18441,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18479,7 +18478,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18538,7 +18537,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -18552,7 +18551,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -18674,7 +18673,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18711,7 +18710,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18787,7 +18786,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18825,7 +18824,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18896,7 +18895,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18934,7 +18933,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19005,7 +19004,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19043,7 +19042,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19114,7 +19113,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19152,7 +19151,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19223,7 +19222,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19261,7 +19260,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19333,7 +19332,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19370,7 +19369,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19438,7 +19437,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19476,7 +19475,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19548,7 +19547,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19585,7 +19584,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19698,7 +19697,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -19738,7 +19737,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -19780,7 +19779,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -19903,7 +19902,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -20248,7 +20247,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -20458,10 +20457,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20479,7 +20478,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20518,7 +20517,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20536,7 +20535,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -20669,10 +20668,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20794,7 +20793,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -20816,7 +20815,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -20914,7 +20913,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -20936,7 +20935,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21122,7 +21121,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -21178,7 +21177,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21217,7 +21216,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -21225,7 +21224,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -21251,6 +21250,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -21270,7 +21270,27 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l3; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -21296,7 +21316,7 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21361,7 +21381,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21483,7 +21503,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21575,7 +21595,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21677,7 +21697,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -21707,7 +21727,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -22161,7 +22181,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -22190,7 +22210,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -22206,7 +22226,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -22223,7 +22243,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -22304,7 +22324,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -22392,10 +22412,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22463,7 +22483,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -22791,7 +22811,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22837,7 +22857,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22845,7 +22865,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22919,7 +22939,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -22961,7 +22981,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -22992,7 +23012,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23048,7 +23068,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -23349,7 +23369,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(stack + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; @@ -23387,7 +23407,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots12 = byteAt(current + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (fmt2 <= 5) { index = numSlots3; @@ -23493,7 +23513,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23514,7 +23534,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(next + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { index = numSlots; @@ -23657,7 +23677,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23727,7 +23747,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23819,7 +23839,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23886,7 +23906,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23946,7 +23966,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24038,7 +24058,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24262,7 +24282,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -24597,7 +24617,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24609,7 +24629,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24658,7 +24678,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24670,7 +24690,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24697,7 +24717,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24709,7 +24729,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24744,7 +24764,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24840,10 +24860,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24862,7 +24882,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -25119,7 +25139,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25252,7 +25272,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -25294,7 +25314,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25408,7 +25428,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25463,7 +25483,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25657,7 +25677,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25698,7 +25718,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -25786,7 +25806,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25859,7 +25879,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25875,7 +25895,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -25929,7 +25949,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25967,7 +25987,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25983,7 +26003,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26050,7 +26070,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26066,7 +26086,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26130,7 +26150,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -26156,7 +26176,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26194,7 +26214,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26210,7 +26230,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26273,7 +26293,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26289,7 +26309,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26352,7 +26372,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26368,7 +26388,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26431,7 +26451,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26447,7 +26467,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26506,7 +26526,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26544,7 +26564,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26560,7 +26580,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26621,7 +26641,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26637,7 +26657,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26693,7 +26713,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26744,7 +26764,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26760,7 +26780,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26862,14 +26882,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27104,7 +27124,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27184,11 +27204,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27198,7 +27218,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27244,7 +27264,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -27281,7 +27301,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27543,7 +27563,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -27594,7 +27614,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -27713,7 +27733,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28133,7 +28153,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28242,7 +28262,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -28282,7 +28302,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -28324,7 +28344,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -28417,7 +28437,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28472,7 +28492,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28559,7 +28579,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -28581,7 +28601,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -28652,25 +28672,15 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -28680,66 +28690,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -28842,20 +28799,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -28901,7 +28858,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28920,14 +28877,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -28936,7 +28893,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -29045,7 +29002,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -29141,7 +29098,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29496,7 +29453,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -29588,7 +29545,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29725,7 +29682,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -29808,7 +29765,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -29900,7 +29857,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30139,9 +30096,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -30221,7 +30178,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -30290,7 +30247,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30335,7 +30292,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30468,7 +30425,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30506,7 +30463,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -30567,7 +30524,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -30966,7 +30923,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -31023,9 +30980,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -31560,7 +31517,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31732,7 +31689,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -31996,7 +31953,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -32037,7 +31994,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32067,7 +32024,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32469,7 +32426,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -32511,7 +32468,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -32566,7 +32523,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32614,7 +32571,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32678,7 +32635,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -32739,7 +32696,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -32793,7 +32750,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -32848,7 +32805,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -32987,7 +32944,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -33024,7 +32981,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -33077,7 +33034,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -33123,7 +33080,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -33161,7 +33118,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -33249,7 +33206,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -33287,7 +33244,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33327,7 +33284,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33384,7 +33341,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -34270,7 +34227,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -34434,7 +34391,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34494,7 +34451,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34587,7 +34544,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -34797,7 +34754,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34911,7 +34868,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35077,7 +35034,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35460,7 +35417,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -35839,7 +35796,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -35923,7 +35880,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -35959,7 +35916,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35997,7 +35954,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36037,7 +35994,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -36110,7 +36067,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -36249,7 +36206,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36467,7 +36424,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36514,7 +36471,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36563,7 +36520,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36943,7 +36900,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -37002,7 +36959,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -37075,7 +37032,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -37155,7 +37112,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37539,7 +37496,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37577,7 +37534,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37823,7 +37780,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37871,7 +37828,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37921,7 +37878,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38016,7 +37973,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38061,7 +38018,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38108,7 +38065,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38831,7 +38788,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38861,14 +38818,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -38899,7 +38856,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -38951,7 +38908,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39071,7 +39028,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -39088,7 +39045,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -39396,7 +39353,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39434,7 +39391,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39474,7 +39431,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39584,9 +39541,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -39749,9 +39706,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -40887,7 +40844,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -40927,7 +40884,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41057,7 +41014,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -41075,7 +41032,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41097,7 +41054,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41133,7 +41090,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -41203,7 +41160,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -41285,7 +41242,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41311,7 +41268,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -41405,7 +41362,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -41545,7 +41502,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41590,7 +41547,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41628,7 +41585,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41722,9 +41679,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41750,7 +41707,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41792,9 +41749,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41820,7 +41777,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41863,9 +41820,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41892,7 +41849,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -42002,9 +41959,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -42123,7 +42080,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -42339,7 +42296,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -42445,7 +42402,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -42511,7 +42468,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -43061,7 +43018,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43098,7 +43055,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43575,7 +43532,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43642,7 +43599,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -43710,7 +43667,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -43753,7 +43710,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43789,7 +43746,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43848,9 +43805,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -43880,7 +43837,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -43894,7 +43851,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -43925,7 +43882,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -44024,7 +43981,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44046,7 +44003,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44069,7 +44026,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44090,7 +44047,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -44168,7 +44125,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44205,7 +44162,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44245,7 +44202,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44802,7 +44759,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44848,7 +44805,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44896,7 +44853,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44998,7 +44955,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45051,7 +45008,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45106,7 +45063,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45179,7 +45136,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45224,7 +45181,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45262,7 +45219,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45353,7 +45310,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45396,7 +45353,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45434,7 +45391,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45610,13 +45567,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -45625,9 +45582,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -45786,7 +45743,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45831,7 +45788,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45869,7 +45826,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46016,7 +45973,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46067,7 +46024,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46120,7 +46077,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46219,7 +46176,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46264,7 +46221,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46302,7 +46259,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46433,7 +46390,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46540,9 +46497,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -46581,7 +46538,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46632,9 +46589,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -46673,7 +46630,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46725,9 +46682,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -46767,7 +46724,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -47470,7 +47427,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -47676,7 +47633,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -47770,7 +47727,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -47824,7 +47781,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -47871,7 +47828,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -47908,7 +47865,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -48031,9 +47988,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -48042,9 +47999,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -48081,7 +48038,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -48730,7 +48687,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -48751,7 +48708,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -49166,7 +49123,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49289,7 +49246,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -49349,7 +49306,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -49646,7 +49603,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -49659,7 +49616,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -49997,7 +49954,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50033,7 +49990,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50071,7 +50028,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50545,7 +50502,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -50934,7 +50891,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -51242,7 +51199,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -51332,7 +51289,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -51713,7 +51670,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -51779,7 +51736,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -51847,7 +51804,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51901,7 +51858,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51941,7 +51898,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51983,7 +51940,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -52099,7 +52056,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -52345,7 +52302,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -52474,7 +52431,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52569,7 +52526,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -52867,7 +52824,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -53921,7 +53878,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -54091,18 +54048,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -54120,7 +54065,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -54409,7 +54354,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -54424,7 +54369,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -54563,7 +54508,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -54656,7 +54601,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -54689,7 +54634,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -54824,7 +54769,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -54994,7 +54939,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55149,7 +55094,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -55443,10 +55388,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -55854,7 +55799,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((((anOop) & 7) == 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -55987,7 +55932,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -56335,7 +56280,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -56530,7 +56475,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -56592,7 +56537,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -56708,7 +56653,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -56922,7 +56867,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -56968,7 +56913,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57013,7 +56958,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -57051,7 +56996,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57672,7 +57617,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -57983,7 +57928,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -58220,7 +58165,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58459,7 +58404,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -58492,12 +58437,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -58525,7 +58470,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -58652,7 +58597,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -59009,7 +58954,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -59042,7 +58987,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -59513,7 +59458,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -59540,11 +59485,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -60044,9 +59989,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -60650,7 +60595,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -60865,7 +60810,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61020,7 +60965,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61200,6 +61145,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -61213,9 +61159,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -61438,7 +61389,7 @@ signalExternalSemaphores(void) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } @@ -61461,14 +61412,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -61572,7 +61523,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -61708,7 +61659,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -61783,7 +61734,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61837,8 +61788,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -61850,7 +61801,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -61873,8 +61824,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -62357,7 +62308,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -62376,16 +62327,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -62399,25 +62350,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -62425,7 +62376,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -62486,7 +62437,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62564,10 +62515,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -62575,7 +62526,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -62606,14 +62557,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62766,7 +62717,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -62881,7 +62832,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62968,7 +62919,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -63310,7 +63261,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -63484,7 +63435,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -63528,7 +63479,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -63574,7 +63525,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -63637,9 +63588,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -63854,7 +63805,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -64081,7 +64032,7 @@ primitiveClosureCopyWithCopiedValues(void) assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(copiedValues + 7); numCopied = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); @@ -64121,10 +64072,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -64195,7 +64146,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -64275,11 +64226,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -64289,7 +64240,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -64325,7 +64276,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64384,11 +64335,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -64398,7 +64349,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -64464,8 +64415,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -64486,7 +64437,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -64653,7 +64604,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64817,7 +64768,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64892,7 +64843,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -64928,7 +64879,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -65027,7 +64978,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -65088,7 +65039,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -65131,7 +65082,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -65293,7 +65244,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -65347,7 +65298,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -65357,7 +65308,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -65396,7 +65347,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -65472,7 +65423,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -65564,7 +65515,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65675,7 +65626,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -65767,7 +65718,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65904,7 +65855,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -65941,7 +65892,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -65986,12 +65937,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -66265,7 +66216,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -66274,7 +66225,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -66314,7 +66265,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -66354,7 +66305,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -66410,11 +66361,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -66424,7 +66375,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -66451,7 +66402,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -66483,7 +66434,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -66774,7 +66725,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -66878,7 +66829,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -66970,7 +66921,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67256,9 +67207,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -67273,7 +67224,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -67300,9 +67251,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -67311,9 +67262,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -67322,7 +67273,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -67334,10 +67285,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -67383,7 +67334,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -67415,9 +67366,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -67486,7 +67437,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -67494,7 +67445,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -67513,7 +67464,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -67521,7 +67472,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67532,12 +67483,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67549,7 +67500,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67560,12 +67511,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67682,7 +67633,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -68180,17 +68131,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68199,7 +68150,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -68226,80 +68177,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45ULL << (shiftForWord())), GIV(nilObj)); @@ -68307,7 +68258,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68315,15 +68266,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68446,13 +68397,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 3) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68476,15 +68427,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -68528,22 +68479,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -68555,43 +68506,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -68599,37 +68550,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -68638,21 +68589,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -68690,12 +68641,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -68705,13 +68656,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -68764,7 +68715,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -68775,13 +68726,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -68790,7 +68741,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -68801,7 +68752,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68810,7 +68761,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68818,7 +68769,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68826,7 +68777,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68846,7 +68797,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -69077,7 +69028,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -69131,7 +69082,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69178,7 +69129,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spurstack64src/vm/interp.c b/spurstack64src/vm/interp.c index c645d3a71d..79c4e34c36 100644 --- a/spurstack64src/vm/interp.c +++ b/spurstack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -370,9 +370,9 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -602,7 +602,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1147,7 +1147,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1206,7 +1205,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1257,7 +1256,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1314,8 +1313,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1543,19 +1542,19 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1593,7 +1592,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2182,7 +2181,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2289,7 +2288,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4235,7 +4234,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5178,7 +5177,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5244,7 +5243,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5310,7 +5309,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5376,7 +5375,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5530,7 +5529,7 @@ interpret(void) l505: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5556,7 +5555,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l504; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); l504: /* end internalQuickPrimitiveResponse */; goto l501; } @@ -5650,7 +5649,7 @@ interpret(void) goto l502; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l502: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5779,7 +5778,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5853,7 +5852,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5986,7 +5985,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6406,10 +6405,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6719,7 +6718,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6744,7 +6743,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6781,7 +6780,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -6860,7 +6859,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6885,7 +6884,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -6922,7 +6921,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7022,7 +7021,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7059,7 +7058,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7203,7 +7202,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7240,7 +7239,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7374,7 +7373,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7411,7 +7410,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7506,7 +7505,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7543,7 +7542,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7635,7 +7634,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7672,7 +7671,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7764,7 +7763,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7801,7 +7800,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -7886,7 +7885,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7913,7 +7912,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -7950,7 +7949,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8035,7 +8034,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8061,7 +8060,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -8098,7 +8097,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -8166,7 +8165,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8267,7 +8266,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -8303,7 +8302,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8469,7 +8468,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -8534,7 +8533,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -8595,7 +8594,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l161; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8605,7 +8604,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l161; } @@ -8632,7 +8631,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l161; } } @@ -8744,7 +8743,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -8809,7 +8808,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -9024,7 +9023,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -9050,7 +9049,7 @@ interpret(void) } sz = 0; l195: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9074,7 +9073,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -9100,7 +9099,7 @@ interpret(void) } sz = 0; l194: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9689,7 +9688,7 @@ interpret(void) result = ((rcvr >> 3)) + ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9714,7 +9713,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9751,7 +9750,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9830,7 +9829,7 @@ interpret(void) result = ((rcvr >> 3)) - ((arg >> 3)); if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9855,7 +9854,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -9892,7 +9891,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -9992,7 +9991,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10029,7 +10028,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10172,7 +10171,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10209,7 +10208,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10343,7 +10342,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10380,7 +10379,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10475,7 +10474,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10512,7 +10511,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10604,7 +10603,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10641,7 +10640,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10733,7 +10732,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10770,7 +10769,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -10855,7 +10854,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 3) | 1); + oop = (((usqInt)result << 3) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10882,7 +10881,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -10919,7 +10918,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11004,7 +11003,7 @@ interpret(void) result = rcvr / arg; if ((((((usqInt) result) >> 60) + 1) & 15) <= 1) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11030,7 +11029,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr1 = value; @@ -11067,7 +11066,7 @@ interpret(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg1 = value1; @@ -11135,7 +11134,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11236,7 +11235,7 @@ interpret(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -11272,7 +11271,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 3) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11438,7 +11437,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt <= 5) { totalLength = numSlots1; @@ -11503,7 +11502,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt1 <= 5) { totalLength1 = numSlots4; @@ -11564,7 +11563,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 3) | 1); goto l313; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -11574,7 +11573,7 @@ interpret(void) result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); /* begin positive32BitIntegerFor: */ - result = ((((((unsigned long)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)(((unsigned int) result1)))) & 0xFFFFFFFFU) << 3) | 1); goto l313; } @@ -11601,7 +11600,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 3) | 1); goto l313; } } @@ -11713,7 +11712,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots3 = byteAt(rcvr + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { totalLength = numSlots1; @@ -11778,7 +11777,7 @@ interpret(void) /* begin lengthOf:format: */ numSlots21 = byteAt(rcvr + 7); numSlots4 = (numSlots21 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots21); if (fmt2 <= 5) { totalLength1 = numSlots4; @@ -11993,7 +11992,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -12019,7 +12018,7 @@ interpret(void) } sz = 0; l347: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12043,7 +12042,7 @@ interpret(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { sz = numSlots2; @@ -12069,7 +12068,7 @@ interpret(void) } sz = 0; l346: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 3) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 3) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12396,7 +12395,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12532,7 +12531,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l379; } if (index == InstructionPointerIndex) { @@ -12700,7 +12699,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 3) | 1)); } break; case 489: /*233*/ @@ -13049,7 +13048,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13117,7 +13116,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13285,7 +13284,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13352,7 +13351,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13518,7 +13517,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (receiverIsOnStack) { startIndex = FullClosureReceiverIndex; @@ -13622,10 +13621,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13735,7 +13734,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); goto l445; } if (slotIndex == InstructionPointerIndex) { @@ -13903,7 +13902,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14082,7 +14081,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 3) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 3) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -14497,7 +14496,7 @@ cStringOrNullFor(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { len = numSlots; @@ -14615,7 +14614,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 3) | 1); + return (((usqInt)smallVal << 3) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14721,22 +14720,22 @@ magnitude64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt value; + sqInt value64; if ((((oop) & 7) == 1)) { - value = (oop >> 3); - if ((value < 0) - || ((((unsigned int) value)) != value)) { + value64 = (oop >> 3); + if ((value64 < 0) + || ((((unsigned int) value64)) != value64)) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - value = 0; + value64 = 0; } - return value; + return value64; } /* begin primitiveFail */ if (!GIV(primFailCode)) { @@ -14824,7 +14823,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14869,14 +14868,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14897,7 +14896,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15277,7 +15276,7 @@ primitiveAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -15357,11 +15356,11 @@ primitiveAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -15371,7 +15370,7 @@ primitiveAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -15410,7 +15409,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15445,7 +15444,7 @@ primitiveAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(rcvr + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -15926,7 +15925,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -15968,10 +15967,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15979,7 +15978,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15994,28 +15993,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16028,10 +16027,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16039,7 +16038,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16054,28 +16053,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16146,10 +16145,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -16157,7 +16156,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16172,28 +16171,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16206,10 +16205,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -16217,7 +16216,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16232,28 +16231,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16347,7 +16346,7 @@ primitiveBitShift(void) shifted = ((sqInt) integerReceiver) >> (0 - integerArgument); } shifted = ((((((usqInt) shifted) >> 60) + 1) & 15) <= 1 - ? ((shifted << 3) | 1) + ? (((usqInt)shifted << 3) | 1) : signed64BitIntegerFor(shifted)); /* begin pop:thenPush: */ @@ -16474,10 +16473,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -16485,7 +16484,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16500,28 +16499,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16533,10 +16532,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16544,7 +16543,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16559,28 +16558,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16664,7 +16663,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -16978,14 +16977,14 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), ((runInNOut << 3) | 1)); + longAtput((objOop + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)runInNOut << 3) | 1)); /* begin positive32BitIntegerFor: */ - v1 = ((((((unsigned long)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v1 = ((((((usqInt)(((unsigned int) (((usqInt)usecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; /* begin positive32BitIntegerFor: */ - v2 = ((((((unsigned long)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); + v2 = ((((((usqInt)(((unsigned int) (((usqInt)msecs)))))) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end positive32BitIntegerFor: */; @@ -17017,7 +17016,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), ((uidx << 3) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)uidx << 3) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -17036,7 +17035,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), ((midx << 3) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4ULL << (shiftForWord())), (((usqInt)midx << 3) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17330,7 +17329,7 @@ primitiveClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -17499,7 +17498,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(arg1 + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -17531,7 +17530,7 @@ primitiveCompareBytes(void) assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(arg2 + 7); numBytes1 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(arg2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes1 = numBytes1 << (shiftForWord()); if (fmt1 >= (firstByteFormat())) { @@ -17645,7 +17644,7 @@ primitiveConstantFill(void) /* begin addressAfter: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -17722,7 +17721,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp; } @@ -17775,7 +17774,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numBytes = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -17811,7 +17810,7 @@ primitiveCopyObject(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!((isAppropriateForCopyObject(arg)) && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { @@ -17935,7 +17934,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((((usqInt) quotient) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -17998,7 +17997,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((((usqInt) (integerReceiver / integerArgument)) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18333,7 +18332,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -18433,7 +18432,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18470,7 +18469,7 @@ primitiveFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18529,7 +18528,7 @@ primitiveFloatAt(void) integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 0 : 1), rcvr))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end positive32BitIntegerFor: */; @@ -18543,7 +18542,7 @@ primitiveFloatAt(void) integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN ? 1 : 0), rcvr))); - result = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -18665,7 +18664,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18702,7 +18701,7 @@ primitiveFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18778,7 +18777,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18816,7 +18815,7 @@ primitiveFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18887,7 +18886,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -18925,7 +18924,7 @@ primitiveFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -18996,7 +18995,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19034,7 +19033,7 @@ primitiveFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19105,7 +19104,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19143,7 +19142,7 @@ primitiveFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19214,7 +19213,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19252,7 +19251,7 @@ primitiveFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19324,7 +19323,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19361,7 +19360,7 @@ primitiveFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19429,7 +19428,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19467,7 +19466,7 @@ primitiveFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19539,7 +19538,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -19576,7 +19575,7 @@ primitiveFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -19689,7 +19688,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -19729,7 +19728,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -19771,7 +19770,7 @@ primitiveFlushExternalPrimitives(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -19894,7 +19893,7 @@ primitiveFormPrint(void) assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(bitsArray + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bitsArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -20239,7 +20238,7 @@ primitiveFullClosureValueWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { /* begin primitiveFail */ @@ -20449,10 +20448,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -20470,7 +20469,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) (evtBuf[0])) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((evtBuf[0]) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)(evtBuf[0]) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20509,7 +20508,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) ((evtBuf[1]) & MillisecondClockMask)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 3) | 1)); } else { /* begin primitiveFail */ @@ -20527,7 +20526,7 @@ primitiveGetNextEvent(void) if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 3) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 3) | 1)); } else { /* begin primitiveFail */ @@ -20660,10 +20659,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((w << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((h << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 3) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20785,7 +20784,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 3) | 1)); GIV(stackPointer) = sp; } } @@ -20807,7 +20806,7 @@ primitiveHeartbeatFrequency(void) && ((longAt(GIV(stackPointer))) == GIV(trueObj)); /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioHeartbeatFrequency(reset))); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -20905,7 +20904,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } } @@ -20927,7 +20926,7 @@ primitiveImageFormatVersion(void) char *sp; /* begin pop:thenPush: */ - oop = ((((((unsigned long)68021)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)68021)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -21113,7 +21112,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } @@ -21169,7 +21168,7 @@ primitiveIntegerAt(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21208,7 +21207,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((((usqInt) value) >> 60) + 1) & 15) <= 1) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -21216,7 +21215,7 @@ primitiveIntegerAt(void) /* 32 bit int may have been stored in 32 or 64 bit sqInt */ intValue = value; /* begin push: */ - object = (((((int) intValue)) << 3) | 1); + object = (((usqInt)(((int) intValue)) << 3) | 1); goto l4; l4: /* end signed32BitIntegerFor: */; @@ -21242,6 +21241,7 @@ primitiveIntegerAtPut(void) char *sp; sqInt sz; int value; + sqInt value64; sqInt valueOop; valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); @@ -21261,7 +21261,27 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + if ((((valueOop) & 7) == 1)) { + value64 = (valueOop >> 3); + if ((((int) value64)) != value64) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value64 = 0; + } + value = value64; + goto l3; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -21287,7 +21307,7 @@ primitiveIntegerAtPut(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { sz = numSlots; @@ -21352,7 +21372,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 3) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -21474,7 +21494,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -21566,7 +21586,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21668,7 +21688,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -21698,7 +21718,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 3) | 1)); GIV(stackPointer) = sp1; } else { @@ -22152,7 +22172,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -22181,7 +22201,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 3) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 3) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -22197,7 +22217,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((sqInt)MillisecondClockMask << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -22214,7 +22234,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((((usqInt) mod) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -22295,7 +22315,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 3) | 1)); GIV(stackPointer) = sp; } @@ -22383,10 +22403,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((x << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((y << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -22454,7 +22474,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } } @@ -22782,7 +22802,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22828,7 +22848,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22836,7 +22856,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22910,7 +22930,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(actualObj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -22952,7 +22972,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(actualObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -22983,7 +23003,7 @@ primitiveNextInstance(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(actualObj + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -23039,7 +23059,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((sqInt)0 << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -23340,7 +23360,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(stack + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stack - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; @@ -23378,7 +23398,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots12 = byteAt(current + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(current - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (fmt2 <= 5) { index = numSlots3; @@ -23484,7 +23504,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 3) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 3) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23505,7 +23525,7 @@ primitivePathToUsing(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(next + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { index = numSlots; @@ -23648,7 +23668,7 @@ primitivePerformInSuperclass(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23718,7 +23738,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23810,7 +23830,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23877,7 +23897,7 @@ primitivePerformWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (arraySize > (LargeContextSlots - CtxtTempFrameStart)) { GIV(primFailCode) = PrimErrBadNumArgs; @@ -23937,7 +23957,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -24029,7 +24049,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -24253,7 +24273,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -24588,7 +24608,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24600,7 +24620,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24649,7 +24669,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24661,7 +24681,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanLastIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanLastIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanLastIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24688,7 +24708,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanDestX) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), ((scanDestX << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0ULL << (shiftForWord())), (((usqInt)scanDestX << 3) | 1)); } else { /* begin primitiveFail */ @@ -24700,7 +24720,7 @@ primitiveScanCharacters(void) if ((((((usqInt) scanStopIndex) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), ((scanStopIndex << 3) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1ULL << (shiftForWord())), (((usqInt)scanStopIndex << 3) | 1)); } else { /* begin primitiveFail */ @@ -24735,7 +24755,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 3) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24831,10 +24851,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 3) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24853,7 +24873,7 @@ primitiveSecondsClock(void) /* begin pop:thenPush: */ integerValue = ((unsigned int) (ioSecondsNow())); - oop = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l1; l1: /* end positive32BitIntegerFor: */; @@ -25110,7 +25130,7 @@ primitiveSetLogDirectory(void) assert((classIndexOf(stringOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(stringOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(stringOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25243,7 +25263,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 3) | 1)); GIV(stackPointer) = sp1; } } @@ -25285,7 +25305,7 @@ primitiveSetWindowLabel(void) assert((classIndexOf(labelOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(labelOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(labelOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -25399,7 +25419,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25454,7 +25474,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 3) | 1)); GIV(stackPointer) = sp; } @@ -25648,7 +25668,7 @@ primitiveSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -25689,7 +25709,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1ULL << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 3) | 1)); GIV(stackPointer) = sp; } @@ -25777,7 +25797,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((unsigned long)((((long)1))) << ((BytesPerOop * 8) - 3))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 3))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25850,7 +25870,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25866,7 +25886,7 @@ primitiveSmallFloatAdd(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -25920,7 +25940,7 @@ primitiveSmallFloatArctan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25958,7 +25978,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -25974,7 +25994,7 @@ primitiveSmallFloatDivide(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26041,7 +26061,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26057,7 +26077,7 @@ primitiveSmallFloatEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26121,7 +26141,7 @@ primitiveSmallFloatExponent(void) /* begin pop:thenPushInteger: */ integerVal = (exponentOfSmallFloat(longAt(GIV(stackPointer)))) - 1; - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -26147,7 +26167,7 @@ primitiveSmallFloatFractionalPart(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26185,7 +26205,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26201,7 +26221,7 @@ primitiveSmallFloatGreaterOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26264,7 +26284,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26280,7 +26300,7 @@ primitiveSmallFloatGreaterThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26343,7 +26363,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26359,7 +26379,7 @@ primitiveSmallFloatLessOrEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26422,7 +26442,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26438,7 +26458,7 @@ primitiveSmallFloatLessThan(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26497,7 +26517,7 @@ primitiveSmallFloatLogN(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26535,7 +26555,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26551,7 +26571,7 @@ primitiveSmallFloatMultiply(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26612,7 +26632,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26628,7 +26648,7 @@ primitiveSmallFloatNotEqual(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26684,7 +26704,7 @@ primitiveSmallFloatSine(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26735,7 +26755,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; @@ -26751,7 +26771,7 @@ primitiveSmallFloatSubtract(void) /* a.k.a. ~= +/-0.0 */ rot1 += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot1 = (rot1 << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1); + rot1 = (rot1 << 0x3F) + (((usqInt) (((usqInt)rot1))) >> 1); bits1 = rot1; memcpy((&value1), (&bits1), sizeof(value1)); arg = value1; @@ -26853,14 +26873,14 @@ primitiveSmallFloatTruncated(void) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); rcvr = value; modf(rcvr, (&trunc)); if (((trunc >= (((double) (MinSmallInteger) ))) && (trunc <= (((double) (MaxSmallInteger) ))))) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -27095,7 +27115,7 @@ primitiveStringAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27175,11 +27195,11 @@ primitiveStringAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l8; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l8; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -27189,7 +27209,7 @@ primitiveStringAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - result = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + result = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l8; } @@ -27235,7 +27255,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -27272,7 +27292,7 @@ primitiveStringAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -27534,7 +27554,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots2 = byteAt(array + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (arrayFmt <= 5) { totalLength = numSlots; @@ -27585,7 +27605,7 @@ primitiveStringReplace(void) /* begin lengthOf:format: */ numSlots3 = byteAt(repl + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(repl - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (replFmt <= 5) { totalLength = numSlots1; @@ -27704,7 +27724,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28124,7 +28144,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 3) | 1)); GIV(stackPointer) = sp; } else { @@ -28233,7 +28253,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -28273,7 +28293,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -28315,7 +28335,7 @@ primitiveUnloadModule(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -28408,7 +28428,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28463,7 +28483,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 3) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 3) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1ULL << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -28550,7 +28570,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 3) | 1)); GIV(stackPointer) = sp1; } @@ -28572,7 +28592,7 @@ primitiveWait(void) if ((((((usqInt) (excessSignals - 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 3) | 1)); + longAtput((sema + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -28643,25 +28663,15 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - long value64; + sqInt value64; if ((((oop) & 7) == 1)) { - - /* Must fail for SmallIntegers with digitLength > 4 */ value64 = (oop >> 3); if ((((int) value64)) != value64) { /* begin primitiveFail */ @@ -28671,66 +28681,13 @@ signed32BitValueOf(sqInt oop) value64 = 0; } return value64; - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; + return 0; - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -28833,20 +28790,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((((oop) & 7) == 1)) { return (oop >> 3); @@ -28892,7 +28849,7 @@ signedMachineIntegerValueOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -28911,14 +28868,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -28927,7 +28884,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -29036,7 +28993,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -29132,7 +29089,7 @@ addressAfter(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -29487,7 +29444,7 @@ bytesInObject(sqInt objOop) header = longAt(objOop); headerNumSlots = header >> (numSlotsFullShift()); if (headerNumSlots == (numSlotsMask())) { - numSlots = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + numSlots = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; } else { numSlots = (headerNumSlots == 0 @@ -29579,7 +29536,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(rcvr + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -29716,7 +29673,7 @@ dbgFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -29799,7 +29756,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; return (((int *) ((&bits))))[fieldIndex]; } @@ -29891,7 +29848,7 @@ floatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30130,9 +30087,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 63)) == 1 - ? ((((((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 - : (((-(numTagBits())) < 0) ? ((usqInt) oop >> -(-(numTagBits()))) : ((usqInt) oop << (-(numTagBits()))))); + return ((((usqInt) oop) >> 0x3F) == 1 + ? (((((usqInt) oop) >> (numTagBits())) & 0x1FFFFFFFFFFFFFFFLL) - 0x1FFFFFFFFFFFFFFFLL) - 1 + : ((usqInt) oop) >> (numTagBits())); } /* Spur64BitMemoryManager>>#isImmediateFloat: */ @@ -30212,7 +30169,7 @@ lengthOfformat(sqInt objOop, sqInt fmt) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -30281,7 +30238,7 @@ objectAfterlimit(sqInt objOop, sqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30326,7 +30283,7 @@ smallFloatValueOf(sqInt oop) /* a.k.a. ~= +/-0.0 */ rot += ((sqInt)((usqInt)((smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1))); } - rot = (rot << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1); + rot = (rot << 0x3F) + (((usqInt) (((usqInt)rot))) >> 1); bits = rot; memcpy((&value), (&bits), sizeof(value)); return value; @@ -30459,7 +30416,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -30497,7 +30454,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -30558,7 +30515,7 @@ allWeakSurvivorsOnWeakList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -30957,7 +30914,7 @@ growRememberedSet(void) assert((classIndexOf(obj)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(obj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); assert(numSlots >= 1024); /* begin allocatePinnedSlots: */ @@ -31014,9 +30971,9 @@ growRememberedSet(void) flag("endianness"); assert((classIndexOf(newObj)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(newObj + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(rememberedSetLimit) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(newObj - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -31551,7 +31508,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) /* begin addressAfter: */ numSlots1 = byteAt(obj + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -31723,7 +31680,7 @@ scavengeReferentsOf(sqInt referrer) assert((classIndexOf(referrer)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(referrer + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(referrer - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numSlots = numSlots2; @@ -31987,7 +31944,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objAfter + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -32028,7 +31985,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objAfter + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32058,7 +32015,7 @@ accessibleObjectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objAfter + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32460,7 +32417,7 @@ allInstancesOf(sqInt aClass) /* begin addressAfter: */ numSlots1 = byteAt(freeChunk + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -32502,7 +32459,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes3 = 8; @@ -32557,7 +32514,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -32605,7 +32562,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -32669,7 +32626,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop11 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes21 = 8; @@ -32730,7 +32687,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop2 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -32784,7 +32741,7 @@ allInstancesOf(sqInt aClass) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop2 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes11 = 8; @@ -32839,7 +32796,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -32978,7 +32935,7 @@ allObjects(void) /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -33015,7 +32972,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots6 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { slotBytes3 = 8; @@ -33068,7 +33025,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -33114,7 +33071,7 @@ allObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -33152,7 +33109,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 3) | 1); + return (((usqInt)count << 3) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -33240,7 +33197,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -33278,7 +33235,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -33318,7 +33275,7 @@ allObjectsUnmarked(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -33375,7 +33332,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -34261,7 +34218,7 @@ byteSizeOf(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(oop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -34425,7 +34382,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34485,7 +34442,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -34578,7 +34535,7 @@ checkHeapFreeSpaceIntegrity(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -34788,7 +34745,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -34902,7 +34859,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35068,7 +35025,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedNewSpaceObjs, s /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -35451,7 +35408,7 @@ checkTraversableSortedFreeList(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -35830,7 +35787,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -35914,7 +35871,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -35950,7 +35907,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -35988,7 +35945,7 @@ clearLeakMapAndMapAccessibleObjects(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36028,7 +35985,7 @@ cloneInOldSpaceForPinning(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); newObj = allocateSlotsForPinningInOldSpacebytesformatclassIndex(numSlots, (((sqInt)((usqInt)((((numSlots < 1) ? 1 : numSlots))) << (shiftForWord())))) + ((numSlots >= (numSlotsMask()) @@ -36101,7 +36058,7 @@ clone(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); fmt = (((usqInt) (longAt(objOop))) >> (formatShift())) & (formatMask()); if (numSlots > ((1ULL << (fixedFieldsFieldWidth())) - 1)) { @@ -36240,7 +36197,7 @@ compact(void) /* begin addressAfter: */ numSlots1 = byteAt(free + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(free - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -36458,7 +36415,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -36505,7 +36462,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -36554,7 +36511,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -36934,7 +36891,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop1 + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -36993,7 +36950,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop12 + 7); numSlots21 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots21 == 0) { slotBytes2 = 8; @@ -37066,7 +37023,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop11 + 7); numSlots31 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { slotBytes11 = 8; @@ -37146,7 +37103,7 @@ eliminateAndFreeForwardersForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop3 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37530,7 +37487,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37568,7 +37525,7 @@ existInstancesInNewSpaceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37814,7 +37771,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -37862,7 +37819,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -37912,7 +37869,7 @@ findStringBeginningWith(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38007,7 +37964,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -38052,7 +38009,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38099,7 +38056,7 @@ findString(char *aCString) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -38822,7 +38779,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(here1 + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -38852,14 +38809,14 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* compute total number of slots in obj2, including header */ header2NumSlots = byteAt(next + 7); obj2slots = (header2NumSlots == (numSlotsMask()) - ? (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) + ? (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(next - BaseHeaderSize))) << 8)))))) >> 8) + ((2 * BaseHeaderSize) / BytesPerWord) : ((header2NumSlots == 0 ? 1 : header2NumSlots)) + (BaseHeaderSize / BytesPerWord)); assert((obj2slots * BytesPerWord) == (bytesInObject(next))); if (header1NumSlots == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ - numSlots4 = obj2slots + (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); + numSlots4 = obj2slots + (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8); flag("endianness"); longAtput(here1 - BaseHeaderSize, (((sqInt)((usqInt)((numSlotsMask())) << 56))) + numSlots4); here1 = here1; @@ -38890,7 +38847,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(here1 + 7); numSlots2 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(here1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots2 == 0) { slotBytes2 = 8; @@ -38942,7 +38899,7 @@ freeUnmarkedObjectsAndSortAndCoalesceFreeSpaceForPigCompact(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -39062,7 +39019,7 @@ goodContextSize(sqInt oop) assert((classIndexOf(oop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); return (numSlots == SmallContextSlots) || (numSlots == LargeContextSlots); @@ -39079,7 +39036,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -39387,7 +39344,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -39425,7 +39382,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -39465,7 +39422,7 @@ initialInstanceOf(sqInt classObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -39575,9 +39532,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(classTableRoot)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(classTableRoot + 7); - GIV(numClassTablePages) = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + GIV(numClassTablePages) = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classTableRoot - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(GIV(numClassTablePages) == ((classTableRootSlots()) + (hiddenRootSlots()))); for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { @@ -39740,9 +39697,9 @@ initializeObjectMemory(sqInt bytesToShift) flag("endianness"); assert((classIndexOf(obj2)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(obj2 + 7); - GIV(rememberedSetLimit) = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + GIV(rememberedSetLimit) = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj2 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); /* begin setRememberedSetRedZone */ fudge = ((((GIV(eden).limit)) - ((GIV(eden).start))) / BytesPerWord) / 1024; GIV(rememberedSetRedZone) = ((((GIV(rememberedSetLimit) * 3) / 4) < fudge) ? fudge : ((GIV(rememberedSetLimit) * 3) / 4)); @@ -40878,7 +40835,7 @@ lengthOfMaybeImmediate(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -40918,7 +40875,7 @@ lengthOf(sqInt objOop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -41048,7 +41005,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(segmentWordArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(segmentWordArray + 7); segmentLimit = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (((((sqInt)((usqInt)((((segmentLimit < 1) ? 1 : segmentLimit))) << (shiftForWord())))) + ((segmentLimit >= (numSlotsMask()) ? BaseHeaderSize + BaseHeaderSize @@ -41066,7 +41023,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots12 = byteAt(segmentWordArray + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41088,7 +41045,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin reverseBytesIn32BitWordsFrom:to: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41124,7 +41081,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots6 = byteAt(outPointerArray + 7); numOutPointers = (numSlots6 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots6); numSegObjs = 0; /* begin objectStartingAt: */ @@ -41194,7 +41151,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop1 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes4 = 8; @@ -41276,7 +41233,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41302,7 +41259,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots14 = byteAt(objOop + 7); numSlots5 = (numSlots14 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots5 == 0) { slotBytes3 = 8; @@ -41396,7 +41353,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* begin objectAfter:limit: */ numSlots16 = byteAt(objOop2 + 7); numSlots22 = (numSlots16 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots16); if (numSlots22 == 0) { slotBytes5 = 8; @@ -41536,7 +41493,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41581,7 +41538,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41619,7 +41576,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -41713,9 +41670,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41741,7 +41698,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -41783,9 +41740,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41811,7 +41768,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -41854,9 +41811,9 @@ longPrintReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } } while (((i -= 1)) >= 0) { @@ -41883,7 +41840,7 @@ longPrintReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -41993,9 +41950,9 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe flag("endianness"); assert((classIndexOf(outPointerArray)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(outPointerArray + 7); - numSlots = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + numSlots = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(outPointerArray - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); assert(oopisLessThan(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(outPointerArray))); for (p = (((usqInt)(outPointerArray + BaseHeaderSize))); p <= (((usqInt)(((outPointerArray + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, GIV(nilObj)); @@ -42114,7 +42071,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes = 8; @@ -42330,7 +42287,7 @@ markAndTrace(sqInt objOop) assert((classIndexOf(objToScan)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objToScan + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objToScan - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { numStrongSlots = numSlots; @@ -42436,7 +42393,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 3) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -42502,7 +42459,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 3) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 3) | 1), GIV(markStack)); } l2: ; @@ -43052,7 +43009,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots1 = byteAt(hereObj + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43089,7 +43046,7 @@ moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) /* begin addressAfter: */ numSlots11 = byteAt(hereObj + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(hereObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43566,7 +43523,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -43633,7 +43590,7 @@ numBytesOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); numBytes = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); numBytes = numBytes << (shiftForWord()); if (fmt >= (firstByteFormat())) { @@ -43701,7 +43658,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -43744,7 +43701,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -43780,7 +43737,7 @@ numberOfForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -43839,9 +43796,9 @@ numPointerSlotsOf(sqInt objOop) flag("endianness"); assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); - return ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + return (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } if (fmt == 7) { return 1; @@ -43871,7 +43828,7 @@ numSlotsOfAny(sqInt objOop) numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -43885,7 +43842,7 @@ numSlotsOf(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop + 7); return (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } @@ -43916,7 +43873,7 @@ numStrongSlotsOfInephemeral(sqInt objOop) assert((classIndexOf(objOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 2) { return numSlots; @@ -44015,7 +43972,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -44037,7 +43994,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes1 = 8; @@ -44060,7 +44017,7 @@ objectAfter(sqInt objOop) /* begin addressAfter: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes2 = 8; @@ -44081,7 +44038,7 @@ objectAfter(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes3 = 8; @@ -44159,7 +44116,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44196,7 +44153,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44236,7 +44193,7 @@ objectBefore(sqInt objOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44793,7 +44750,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -44839,7 +44796,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -44887,7 +44844,7 @@ printActivationsOf(sqInt aMethodObj) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -44989,7 +44946,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45042,7 +44999,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45097,7 +45054,7 @@ printContextReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45170,7 +45127,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45215,7 +45172,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop2 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45253,7 +45210,7 @@ printForwarders(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop2 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45344,7 +45301,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45387,7 +45344,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45425,7 +45382,7 @@ printFreeChunks(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -45601,13 +45558,13 @@ printHeaderOf(sqInt objOop) print(" hdr16 slotf "); /* begin printHexnp: */ numSlots = byteAt((objOop - 8) + 7); - n = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + n = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt((objOop - 8) - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); printf("0x%lx", ((unsigned long) n)); print(" slotc "); /* begin printHexnp: */ - n1 = ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; + n1 = ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8; printf("0x%lx", ((unsigned long) n1)); /* begin space */ putchar(' '); @@ -45616,9 +45573,9 @@ printHeaderOf(sqInt objOop) print(" hdr8 slots "); /* begin printHexnp: */ numSlots1 = byteAt(objOop + 7); - n2 = ((usqInt) ((numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots1))); + n2 = (numSlots1 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots1); printf("0x%lx", ((unsigned long) n2)); } /* begin space */ @@ -45777,7 +45734,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -45822,7 +45779,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -45860,7 +45817,7 @@ printInstancesWithClassIndex(sqInt classIndex) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46007,7 +45964,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46058,7 +46015,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46111,7 +46068,7 @@ printMethodReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46210,7 +46167,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46255,7 +46212,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46293,7 +46250,7 @@ printObjectsWithHash(sqInt hash) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -46424,7 +46381,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46531,9 +46488,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l17; } if (fmt == 7) { @@ -46572,7 +46529,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -46623,9 +46580,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop1 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l19; } if (fmt == 7) { @@ -46664,7 +46621,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -46716,9 +46673,9 @@ printReferencesTo(sqInt anOop) flag("endianness"); assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(objOop11 + 7); - i = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + i = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); goto l21; } if (fmt == 7) { @@ -46758,7 +46715,7 @@ printReferencesTo(sqInt anOop) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots5 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots5 == 0) { slotBytes2 = 8; @@ -47461,7 +47418,7 @@ slotSizeOf(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -47667,7 +47624,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots12 = byteAt(freeChunk + 7); numSlots7 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots7 == 0) { slotBytes1 = 8; @@ -47761,7 +47718,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop3 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -47815,7 +47772,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -47862,7 +47819,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop12 + 7); numSlots41 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots41 == 0) { slotBytes2 = 8; @@ -47899,7 +47856,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 3) | 1); + arrayOfObjects = (((usqInt)count << 3) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -48022,9 +47979,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedInHashes)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(savedInHashes + 7); - numSlots = ((usqInt) ((numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots2))); + numSlots = (numSlots2 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedInHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots2); assert(oopisLessThan(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(savedInHashes))); for (p = (((usqInt)(savedInHashes + BaseHeaderSize))); p <= (((usqInt)(((savedInHashes + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1))); p += 8) { longAtput(p, fillValue); @@ -48033,9 +47990,9 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr flag("endianness"); assert((classIndexOf(savedOutHashes)) > (isForwardedObjectClassIndexPun())); numSlots3 = byteAt(savedOutHashes + 7); - numSlots1 = ((usqInt) ((numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots3))); + numSlots1 = (numSlots3 == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(savedOutHashes - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots3); assert(oopisLessThan(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1, addressAfter(savedOutHashes))); for (p1 = (((usqInt)(savedOutHashes + BaseHeaderSize))); p1 <= (((usqInt)(((savedOutHashes + BaseHeaderSize) + (numSlots1 * BytesPerOop)) - 1))); p1 += 8) { longAtput(p1, fillValue); @@ -48072,7 +48029,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr /* begin addressAfter: */ numSlots11 = byteAt(segmentWordArray + 7); numSlots6 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots6 == 0) { slotBytes = 8; @@ -48721,7 +48678,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -48742,7 +48699,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -49157,7 +49114,7 @@ prepareForSnapshot(void) /* begin addressAfter: */ numSlots1 = byteAt(node + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { slotBytes = 8; @@ -49280,7 +49237,7 @@ readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) bridge = bridgehead + BaseHeaderSize; bridgeSpan = ((byteAt(bridgehead + 7)) == 0 ? 0 - : BytesPerOop * (((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); + : BytesPerOop * (((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(bridge - BaseHeaderSize))) << 8)))))) >> 8)); oldBase = (oldBase + nextSegmentSize) + bridgeSpan; newBase = (newBase + nextSegmentSize) - (2 * BaseHeaderSize); nextSegmentSize = ((usqInt)(long64At(bridge))); @@ -49340,7 +49297,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -49637,7 +49594,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -49650,7 +49607,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -49988,7 +49945,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -50024,7 +49981,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -50062,7 +50019,7 @@ checkAllAccessibleObjectsOkay(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -50536,7 +50493,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -50925,7 +50882,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -51233,7 +51190,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -51323,7 +51280,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -51704,7 +51661,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots111 = byteAt(objOop12 + 7); numSlots21 = (numSlots111 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { slotBytes3 = 8; @@ -51770,7 +51727,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots121 = byteAt(objOop12 + 7); numSlots31 = (numSlots121 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots31 == 0) { slotBytes11 = 8; @@ -51838,7 +51795,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -51892,7 +51849,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -51932,7 +51889,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -51974,7 +51931,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) /* begin objectAfter:limit: */ numSlots15 = byteAt(objOop13 + 7); numSlots6 = (numSlots15 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots6 == 0) { slotBytes4 = 8; @@ -52090,7 +52047,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -52336,7 +52293,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 3) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 3) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -52465,7 +52422,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 3) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52560,7 +52517,7 @@ findClassContainingMethodstartingAt(sqInt meth, sqInt classObj) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { /* begin noFixupFollowField:ofObject: */ @@ -52858,7 +52815,7 @@ findSelectorOfMethod(sqInt meth) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (classDictSize > MethodArrayIndex) { methodArray = longAt((classDict + BaseHeaderSize) + (((sqInt)((usqInt)(MethodArrayIndex) << (shiftForWord()))))); @@ -53912,7 +53869,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 3) | 1); } @@ -54082,18 +54039,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -54111,7 +54056,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -54400,7 +54345,7 @@ lengthOfNameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { return lengthOfNameOfClass(longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord())))))); @@ -54415,7 +54360,7 @@ lengthOfNameOfClass(sqInt classOop) /* begin numSlotsOfAny: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt <= 5) { return numSlots2; @@ -54554,7 +54499,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots2 = byteAt(oop + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt1 <= 5) { len = numSlots; @@ -54647,7 +54592,7 @@ longPrintOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots3 = byteAt(oop + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt2 <= 5) { lastIndex = numSlots1; @@ -54680,7 +54625,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -54815,7 +54760,7 @@ lookupMethodInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -54985,7 +54930,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); /* Use linear search on small dictionaries; its cheaper. @@ -55140,7 +55085,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(dictionary + 7); length = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(dictionary - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); mask = (length - SelectorStart) - 1; @@ -55434,10 +55379,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 3) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((sqInt)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 3) | 1)); return pointResult; } @@ -55845,7 +55790,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((((anOop) & 7) == 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 3) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -55978,7 +55923,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -56326,7 +56271,7 @@ nameOfClass(sqInt classOop) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == GIV(metaclassNumSlots)) { maybeThisClassOop = longAt((classOop + BaseHeaderSize) + (((sqInt)((usqInt)(GIV(thisClassIndex)) << (shiftForWord()))))); @@ -56521,7 +56466,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } @@ -56583,7 +56528,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt resultObj; @@ -56699,7 +56644,7 @@ printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass) assert((classIndexOf(classDict)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classDict + 7); classDictSize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classDict - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); i = SelectorStart; while (i < classDictSize) { @@ -56913,7 +56858,7 @@ printAllStacks(void) assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); p = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); } else { @@ -56959,7 +56904,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop3 + 7); numSlots4 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop3 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { slotBytes2 = 8; @@ -57004,7 +56949,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots1 = byteAt(objOop + 7); numSlots2 = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { slotBytes = 8; @@ -57042,7 +56987,7 @@ printAllStacks(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { slotBytes1 = 8; @@ -57663,7 +57608,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -57974,7 +57919,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -58211,7 +58156,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -58450,7 +58395,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop14 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop14 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -58483,12 +58428,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -58516,7 +58461,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -58643,7 +58588,7 @@ printNameOfClasscount(sqInt classOop, sqInt cnt) assert((classIndexOf(classOop)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(classOop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if ((numSlots == GIV(metaclassNumSlots)) && (GIV(metaclassNumSlots) > GIV(thisClassIndex))) { @@ -59000,7 +58945,7 @@ printOop(sqInt oop) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt1 <= 5) { lastIndex = numSlots; @@ -59033,7 +58978,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -59504,7 +59449,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 3) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 3) | 1)); GIV(stackPointer) = sp; return null; } @@ -59531,11 +59476,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -60035,9 +59980,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea flag("endianness"); assert((classIndexOf(classArrayClass)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(classArrayClass + 7); - GIV(metaclassNumSlots) = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + GIV(metaclassNumSlots) = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(classArrayClass - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); /* default */ GIV(thisClassIndex) = 5; @@ -60641,7 +60586,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -60856,7 +60801,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61011,7 +60956,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61191,6 +61136,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -61204,9 +61150,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((((longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((((senderOop) & 7) == 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -61429,7 +61380,7 @@ signalExternalSemaphores(void) sqInt signed32BitIntegerFor(sqInt integerValue) { - return (((((int) integerValue)) << 3) | 1); + return (((usqInt)(((int) integerValue)) << 3) | 1); } @@ -61452,14 +61403,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 3) | 1); + return (((usqInt)(((sqInt)integerValue)) << 3) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -61563,7 +61514,7 @@ sizeOfSTArrayFromCPrimitive(void *cPtr) /* begin numSlotsOfAny: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { return numSlots; @@ -61699,7 +61650,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 3) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 3) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -61774,7 +61725,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -61828,8 +61779,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -61841,7 +61792,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -61864,8 +61815,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -62348,7 +62299,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -62367,16 +62318,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -62390,25 +62341,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -62416,7 +62367,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -62477,7 +62428,7 @@ stObjectat(sqInt array, sqInt index) /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62555,10 +62506,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -62566,7 +62517,7 @@ stObjectat(sqInt array, sqInt index) /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - return ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + return ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); } /* begin primitiveFailFor: */ @@ -62597,14 +62548,14 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); /* begin lengthOf:format: */ numSlots1 = byteAt(array + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(array - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62757,7 +62708,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((((usqInt) integerValue) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 3) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 3) | 1)); } else { /* begin primitiveFail */ @@ -62872,7 +62823,7 @@ stSizeOf(sqInt oop) /* begin lengthOf:format: */ numSlots1 = byteAt(oop + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(oop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -62959,7 +62910,7 @@ synchronousSignal(sqInt aSemaphore) if ((((((usqInt) (excessSignals + 1)) >> 60) + 1) & 15) <= 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 3) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((sqInt)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 3) | 1)); } else { /* begin primitiveFail */ @@ -63301,7 +63252,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 3) | 1)); + longAtput((theContext + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 3) | 1)); } @@ -63475,7 +63426,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop1 + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -63519,7 +63470,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -63565,7 +63516,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop11 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; @@ -63628,9 +63579,9 @@ wakeHighestPriority(void) flag("endianness"); assert((classIndexOf(schedLists)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(schedLists + 7); - p = ((usqInt) ((numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 - : numSlots))); + p = (numSlots == (numSlotsMask()) + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(schedLists - BaseHeaderSize))) << 8)))))) >> 8 + : numSlots); } else { p = GIV(highestRunnableProcessPriority); @@ -63845,7 +63796,7 @@ cloneContext(sqInt aContext) assert((classIndexOf(aContext)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(aContext + 7); sz = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); cloned = allocateNewSpaceSlotsformatclassIndex(sz, indexablePointersFormat(), ClassMethodContextCompactIndex); if (cloned != 0) { @@ -64072,7 +64023,7 @@ primitiveClosureCopyWithCopiedValues(void) assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(copiedValues + 7); numCopied = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(copiedValues - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); @@ -64112,10 +64063,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -64186,7 +64137,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -64266,11 +64217,11 @@ primitiveContextAt(void) goto l12; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 3) | 1); goto l12; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 3) | 1); goto l12; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -64280,7 +64231,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue1 = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2)))); - value = ((((((unsigned long)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue1)) & 0xFFFFFFFFU) << 3) | 1); goto l12; } @@ -64316,7 +64267,7 @@ primitiveContextAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64375,11 +64326,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 3) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 3) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -64389,7 +64340,7 @@ primitiveContextAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l4; l4: /* end subscript:with:format: */; @@ -64455,8 +64406,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -64477,7 +64428,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots11 = byteAt(aContext + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { totalLength1 = numSlots2; @@ -64644,7 +64595,7 @@ primitiveContextAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(aContext + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(aContext - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64808,7 +64759,7 @@ primitiveContextSize(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -64883,7 +64834,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 3) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 3) | 1)); GIV(stackPointer) = sp; } @@ -64919,7 +64870,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 3) | 1)); GIV(stackPointer) = sp; } @@ -65018,7 +64969,7 @@ primitiveDoNamedPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots2 = byteAt(argumentArray + 7); arraySize = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -2); @@ -65079,7 +65030,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots1 = byteAt(moduleName + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { moduleLength = numSlots; @@ -65122,7 +65073,7 @@ primitiveDoNamedPrimitiveWithArgs(void) /* begin numSlotsOfAny: */ numSlots11 = byteAt(functionName + 7); numSlots3 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (fmt1 <= 5) { functionLength = numSlots3; @@ -65284,7 +65235,7 @@ primitiveDoPrimitiveWithArgs(void) assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); numSlots = byteAt(argumentArray + 7); arraySize = (numSlots == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(argumentArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); if (!(roomToPushNArgs(arraySize))) { (GIV(primFailCode) = -PrimErrLimitExceeded); @@ -65338,7 +65289,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -65348,7 +65299,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 3) | 1); + GIV(newMethod) = (((usqInt)primIdx << 3) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -65387,7 +65338,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 3) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 3) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -65463,7 +65414,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -65555,7 +65506,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65666,7 +65617,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -65758,7 +65709,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -65895,7 +65846,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots2 = byteAt(moduleName + 7); numSlots = (numSlots2 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(moduleName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); if (fmt <= 5) { moduleLength = numSlots; @@ -65932,7 +65883,7 @@ primitiveExternalCall(void) /* begin numSlotsOfAny: */ numSlots3 = byteAt(functionName + 7); numSlots1 = (numSlots3 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(functionName - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); if (fmt1 <= 5) { functionLength = numSlots1; @@ -65977,12 +65928,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), ((accessorDepth << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (2ULL << (shiftForWord())), (((usqInt)accessorDepth << 3) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), ((index << 3) | 1)); + longAtput((lit + BaseHeaderSize) + (3ULL << (shiftForWord())), (((usqInt)index << 3) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -66256,7 +66207,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = fullGC(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; return; @@ -66265,7 +66216,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 3) | 1)); GIV(stackPointer) = sp1; } @@ -66305,7 +66256,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 3) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 3) | 1)); GIV(stackPointer) = sp; } @@ -66345,7 +66296,7 @@ primitiveInstVarAt(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -66401,11 +66352,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 3) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 3) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -66415,7 +66366,7 @@ primitiveInstVarAt(void) /* begin positive32BitIntegerFor: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 2)))); - value = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + value = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l2; l2: /* end subscript:with:format: */; @@ -66442,7 +66393,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -66474,7 +66425,7 @@ primitiveInstVarAtPut(void) /* begin lengthOf:format: */ numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (fmt <= 5) { totalLength = numSlots; @@ -66765,7 +66716,7 @@ primitiveObjectPointsTo(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); } } @@ -66869,7 +66820,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -66961,7 +66912,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 3) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -67247,9 +67198,9 @@ primitiveSlotAt(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -67264,7 +67215,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -67291,9 +67242,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 3) | 1)); GIV(stackPointer) = sp1; return; } @@ -67302,9 +67253,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 3) | 1)); GIV(stackPointer) = sp2; return; } @@ -67313,7 +67264,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -67325,10 +67276,10 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); - oop1 = ((((((unsigned long)integerValue)) & 0xFFFFFFFFU) << 3) | 1); + oop1 = ((((((usqInt)integerValue)) & 0xFFFFFFFFU) << 3) | 1); goto l3; l3: /* end positive32BitIntegerFor: */; @@ -67374,7 +67325,7 @@ primitiveSlotAtPut(void) char *sp2; char *sp3; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -67406,9 +67357,9 @@ primitiveSlotAtPut(void) assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); numSlots1 = byteAt(rcvr + 7); numSlots = (numSlots1 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -67477,7 +67428,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -67485,7 +67436,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -67504,7 +67455,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -67512,7 +67463,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67523,12 +67474,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67540,7 +67491,7 @@ primitiveSlotAtPut(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))), value); /* begin pop:thenPush: */ longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67551,12 +67502,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstLongFormat())) { - if ((((unsigned long)value)) > 0xFFFFFFFFU) { + if ((((usqInt)value)) > 0xFFFFFFFFU) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -67673,7 +67624,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 3) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 3) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -68171,17 +68122,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2ULL << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5ULL << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), ((GIV(statFullGCs) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (6ULL << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7ULL << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 3) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8ULL << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68190,7 +68141,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9ULL << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), ((GIV(statTenures) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (10ULL << (shiftForWord())), (((usqInt)GIV(statTenures) << 3) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -68217,80 +68168,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19ULL << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 3) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20ULL << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), ((GIV(statRootTableOverflows) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (21ULL << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), ((extraVMMemory << 3) | 1)); + longAtput((result + BaseHeaderSize) + (22ULL << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), ((GIV(shrinkThreshold) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (23ULL << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), ((GIV(growHeadroom) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (24ULL << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25ULL << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), ((GIV(statMarkCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (26ULL << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (27ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (28ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), ((GIV(statCompactPassCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (29ULL << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), ((GIV(statGrowMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (30ULL << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), ((GIV(statShrinkMemory) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FULL << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), ((GIV(statRootTableCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (32ULL << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), ((GIV(statSurvivorCount) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (34ULL << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35ULL << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((sqInt)0 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (36ULL << (shiftForWord())), (((usqInt)0 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37ULL << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (38ULL << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), ((BytesPerWord << 3) | 1)); + longAtput((result + BaseHeaderSize) + (39ULL << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((sqInt)68021 << 3) | 1)); + longAtput((result + BaseHeaderSize) + (40ULL << (shiftForWord())), (((usqInt)68021 << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), ((GIV(numStackPages) << 3) | 1)); + longAtput((result + BaseHeaderSize) + (41ULL << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), ((desiredNumStackPages << 3) | 1)); + longAtput((result + BaseHeaderSize) + (42ULL << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43ULL << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), ((desiredEdenBytes << 3) | 1)); + longAtput((result + BaseHeaderSize) + (44ULL << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45ULL << (shiftForWord())), GIV(nilObj)); @@ -68298,7 +68249,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46ULL << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68306,15 +68257,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47ULL << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48ULL << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51ULL << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 3) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52ULL << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68437,13 +68388,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FULL << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64ULL << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 3) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65ULL << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -68467,15 +68418,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67ULL << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68ULL << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 3) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69ULL << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 3) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70ULL << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -68519,22 +68470,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 3) | 1); + result = (((usqInt)GIV(statFullGCs) << 3) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 3) | 1); + result = (((usqInt)(GIV(statScavenges)) << 3) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 3) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 3) | 1); + result = (((usqInt)GIV(statTenures) << 3) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -68546,43 +68497,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 3) | 1); + result = (((usqInt)(rootTableCount()) << 3) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 3) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); } if (arg == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 3) | 1); + result = (((usqInt)GIV(statMarkCount) << 3) | 1); } if (arg == 28) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 29) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 3) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 3) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 3) | 1); + result = (((usqInt)GIV(statGrowMemory) << 3) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 3) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 3) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 3) | 1); + result = (((usqInt)GIV(statRootTableCount) << 3) | 1); } if (arg == 34) { @@ -68590,37 +68541,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 3) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 3) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); } if (arg == 37) { - result = (((sqInt)0 << 3) | 1); + result = (((usqInt)0 << 3) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 3) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1); } if (arg == 40) { - result = ((BytesPerWord << 3) | 1); + result = (((usqInt)BytesPerWord << 3) | 1); } if (arg == 41) { - result = (((sqInt)68021 << 3) | 1); + result = (((usqInt)68021 << 3) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 3) | 1); + result = (((usqInt)GIV(numStackPages) << 3) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -68629,21 +68580,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 3) | 1); + result = (((usqInt)(rootTableCapacity()) << 3) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 3) | 1); + result = (((usqInt)(numSegments()) << 3) | 1); } if ((arg == 54) && (1)) { @@ -68681,12 +68632,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1)) << 3) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 3) | 1); + result = (((usqInt)(stackPageByteSize()) << 3) | 1); } if ((arg == 67) && (1)) { @@ -68696,13 +68647,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 3) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 3) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -68755,7 +68706,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -68766,13 +68717,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 3) | 1); + result = (((usqInt)extraVMMemory << 3) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 3) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 3) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -68781,7 +68732,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 3) | 1); + result = (((usqInt)GIV(growHeadroom) << 3) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -68792,7 +68743,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 3) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68801,7 +68752,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 3) | 1); + result = (((usqInt)desiredNumStackPages << 3) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68809,7 +68760,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 3) | 1); + result = (((usqInt)desiredEdenBytes << 3) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -68817,7 +68768,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -68837,7 +68788,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 3) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ @@ -69068,7 +69019,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); numSlots2 = (numSlots11 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { slotBytes = 8; @@ -69122,7 +69073,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots12 = byteAt(objOop1 + 7); numSlots3 = (numSlots12 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { slotBytes1 = 8; @@ -69169,7 +69120,7 @@ unmarkAfterPathTo(void) /* begin objectAfter:limit: */ numSlots13 = byteAt(objOop1 + 7); numSlots4 = (numSlots13 == (numSlotsMask()) - ? ((usqInt) (((unsigned long)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 + ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { slotBytes2 = 8; diff --git a/spurstack64src/vm/vmCallback.h b/spurstack64src/vm/vmCallback.h index f60fc1b526..6c4fdfda5e 100644 --- a/spurstack64src/vm/vmCallback.h +++ b/spurstack64src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.962 uuid: 7f55aa33-f2c1-4b7d-8456-5c2a33e4298b + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/spurstacksrc/vm/gcc3x-interp.c b/spurstacksrc/vm/gcc3x-interp.c index 2fc36b4502..1e7ae0aa5c 100644 --- a/spurstacksrc/vm/gcc3x-interp.c +++ b/spurstacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -372,9 +372,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -585,7 +586,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1126,7 +1127,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1186,7 +1186,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1237,7 +1237,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1294,8 +1294,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1523,19 +1523,19 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1573,7 +1573,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2162,7 +2162,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2265,7 +2265,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; JUMP_TABLE; @@ -4217,7 +4217,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5160,7 +5160,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5226,7 +5226,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5292,7 +5292,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5358,7 +5358,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5514,7 +5514,7 @@ interpret(void) l515: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5540,7 +5540,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l514; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l514: /* end internalQuickPrimitiveResponse */; goto l511; } @@ -5634,7 +5634,7 @@ interpret(void) goto l512; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l512: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5763,7 +5763,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5837,7 +5837,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5970,7 +5970,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6390,10 +6390,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6694,7 +6694,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6792,7 +6792,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7517,7 +7517,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7623,7 +7623,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7720,7 +7720,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7828,7 +7828,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l150; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -7904,7 +7904,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8200,7 +8200,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l170; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8213,7 +8213,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l170; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8277,7 +8277,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l170; } } @@ -8334,7 +8334,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -8695,7 +8695,7 @@ interpret(void) } sz = 0; l200: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8745,7 +8745,7 @@ interpret(void) } sz = 0; l199: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9331,7 +9331,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9429,7 +9429,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10153,7 +10153,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10259,7 +10259,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10356,7 +10356,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10464,7 +10464,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l307; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10540,7 +10540,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10836,7 +10836,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l327; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -10849,7 +10849,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l327; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10913,7 +10913,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l327; } } @@ -10970,7 +10970,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut1); @@ -11331,7 +11331,7 @@ interpret(void) } sz = 0; l357: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11381,7 +11381,7 @@ interpret(void) } sz = 0; l356: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11708,7 +11708,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11844,7 +11844,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l389; } if (index == InstructionPointerIndex) { @@ -12012,7 +12012,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } BREAK; CASE(489) /*233*/ @@ -12363,7 +12363,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12431,7 +12431,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12599,7 +12599,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12666,7 +12666,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12832,7 +12832,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (receiverIsOnStack) { startIndex = FullClosureReceiverIndex; @@ -12936,10 +12936,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13049,7 +13049,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l455; } if (slotIndex == InstructionPointerIndex) { @@ -13217,7 +13217,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13396,7 +13396,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13932,7 +13932,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14046,13 +14046,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -14061,10 +14140,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -14108,6 +14187,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -14188,7 +14268,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14233,14 +14313,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14261,7 +14341,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -14744,11 +14824,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -14837,7 +14917,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15353,7 +15433,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15395,10 +15475,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15406,7 +15486,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15421,28 +15501,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -15455,10 +15535,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -15466,7 +15546,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15481,28 +15561,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -15573,10 +15653,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15584,7 +15664,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15599,28 +15679,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -15633,10 +15713,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -15644,7 +15724,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15659,28 +15739,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -15781,7 +15861,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -15948,10 +16028,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -15959,7 +16039,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15974,28 +16054,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -16007,10 +16087,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16018,7 +16098,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16033,28 +16113,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16138,7 +16218,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -16457,7 +16537,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -16578,7 +16658,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -16597,7 +16677,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17283,7 +17363,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -17496,7 +17576,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17559,7 +17639,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17931,7 +18011,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19776,10 +19856,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -19797,7 +19877,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -19836,7 +19916,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -19854,7 +19934,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -19987,10 +20067,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20110,7 +20190,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20275,7 +20355,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20304,7 +20384,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -20520,7 +20600,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -20615,7 +20695,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20668,7 +20748,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -20759,7 +20843,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -20883,7 +20967,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -20975,7 +21059,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21077,7 +21161,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21107,7 +21191,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21576,7 +21660,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -21605,7 +21689,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -21621,7 +21705,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -21638,7 +21722,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21719,7 +21803,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -21807,10 +21891,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -21878,7 +21962,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -22204,7 +22288,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22250,7 +22334,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22258,7 +22342,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22461,7 +22545,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22903,7 +22987,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23138,7 +23222,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23230,7 +23314,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23359,7 +23443,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23451,7 +23535,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23675,7 +23759,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24010,7 +24094,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24022,7 +24106,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24071,7 +24155,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24083,7 +24167,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24110,7 +24194,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24122,7 +24206,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24157,7 +24241,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24253,10 +24337,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24712,7 +24796,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -24868,7 +24952,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -24923,7 +25007,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25177,7 +25261,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -25265,7 +25349,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25641,11 +25725,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25741,7 +25825,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -26210,7 +26294,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26653,7 +26737,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26937,7 +27021,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -26992,7 +27076,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27079,7 +27163,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -27101,7 +27185,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -27172,83 +27256,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -27351,20 +27366,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -27429,14 +27444,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -27445,7 +27460,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -27554,7 +27569,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -28574,9 +28589,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -31279,7 +31294,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -31588,7 +31603,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -37496,7 +37511,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -40841,7 +40856,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -40905,7 +40920,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -44820,7 +44835,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46271,7 +46286,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -47089,7 +47104,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -47110,7 +47125,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -47708,7 +47723,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -48005,7 +48020,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -48018,7 +48033,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -48110,7 +48125,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -48904,7 +48919,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -49293,7 +49308,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -49601,7 +49616,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -49691,7 +49706,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -50456,7 +50471,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -50702,7 +50717,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -50844,7 +50859,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52306,7 +52321,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -52473,18 +52488,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -52502,7 +52505,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -53071,7 +53074,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -53831,10 +53834,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -54242,7 +54245,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -54375,7 +54378,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -54756,7 +54759,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -55142,7 +55145,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -56271,7 +56274,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -57052,12 +57055,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -57085,7 +57088,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -57589,7 +57592,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -58060,7 +58063,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -58087,11 +58090,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -59197,7 +59200,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -59412,7 +59415,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -59567,7 +59570,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -59747,6 +59750,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -59760,9 +59764,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -60006,14 +60015,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -60267,7 +60276,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -60342,7 +60351,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60396,8 +60405,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -60409,7 +60418,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -60432,8 +60441,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -60932,7 +60941,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -60951,16 +60960,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -60974,25 +60983,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -61000,7 +61009,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -61143,10 +61152,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -61224,7 +61233,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -61384,7 +61393,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -61586,7 +61595,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -61928,7 +61937,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -62734,10 +62743,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -62896,11 +62905,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -63045,11 +63054,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -63166,8 +63175,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -63594,7 +63603,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -63630,7 +63639,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -64049,7 +64058,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -64059,7 +64068,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -64098,7 +64107,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -64174,7 +64183,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -64266,7 +64275,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -64377,7 +64386,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -64469,7 +64478,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -64688,12 +64697,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -64967,7 +64976,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -64976,7 +64985,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -65016,7 +65025,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -65116,11 +65125,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -65198,7 +65207,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -65627,7 +65636,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -65719,7 +65728,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -66012,7 +66021,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -66027,7 +66036,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -66054,9 +66063,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -66065,9 +66074,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -66076,7 +66085,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -66088,7 +66097,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -66176,7 +66185,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -66210,7 +66219,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -66279,7 +66288,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -66287,7 +66296,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -66306,7 +66315,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -66314,7 +66323,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66325,12 +66334,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66342,7 +66351,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66459,7 +66468,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -66958,17 +66967,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -66977,7 +66986,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -67004,80 +67013,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); @@ -67085,7 +67094,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -67093,15 +67102,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -67224,13 +67233,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 1) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -67254,15 +67263,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -67306,22 +67315,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -67333,43 +67342,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -67377,37 +67386,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -67416,21 +67425,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -67468,12 +67477,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -67483,13 +67492,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -67541,7 +67550,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -67552,13 +67561,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -67567,7 +67576,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -67578,7 +67587,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67587,7 +67596,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67595,7 +67604,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67603,7 +67612,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -67623,7 +67632,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spurstacksrc/vm/interp.c b/spurstacksrc/vm/interp.c index 94d6c7cd07..6cbf60deb8 100644 --- a/spurstacksrc/vm/interp.c +++ b/spurstacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -369,9 +369,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -582,7 +583,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -1123,7 +1124,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -1183,7 +1183,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1234,7 +1234,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1291,8 +1291,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1520,19 +1520,19 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt *extraRoots[ExtraRootsSize + 1 /* 2049 */]; _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt preferredPinningSegment; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; @@ -1570,7 +1570,7 @@ sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; -unsigned long maxOldSpaceSize; +usqInt maxOldSpaceSize; sqInt breakSelectorLength = MinSmallInteger; sqInt inIOProcessEvents; void * showSurfaceFn; @@ -2159,7 +2159,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2262,7 +2262,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4208,7 +4208,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5151,7 +5151,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5217,7 +5217,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5283,7 +5283,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5349,7 +5349,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5505,7 +5505,7 @@ interpret(void) l515: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5531,7 +5531,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l514; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l514: /* end internalQuickPrimitiveResponse */; goto l511; } @@ -5625,7 +5625,7 @@ interpret(void) goto l512; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l512: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5754,7 +5754,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l30; } if (byte3 == InstructionPointerIndex) { @@ -5828,7 +5828,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -5961,7 +5961,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((byte3 + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -6381,10 +6381,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -6685,7 +6685,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6783,7 +6783,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7508,7 +7508,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7614,7 +7614,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7711,7 +7711,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -7819,7 +7819,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l150; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -7895,7 +7895,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8191,7 +8191,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l170; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -8204,7 +8204,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l170; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -8268,7 +8268,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l170; } } @@ -8325,7 +8325,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -8686,7 +8686,7 @@ interpret(void) } sz = 0; l200: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8736,7 +8736,7 @@ interpret(void) } sz = 0; l199: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9322,7 +9322,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -9420,7 +9420,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10144,7 +10144,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -10250,7 +10250,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10347,7 +10347,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10455,7 +10455,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l307; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10531,7 +10531,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -10827,7 +10827,7 @@ interpret(void) /* 64, 32, & 16 bits */ if (fmt2 >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))) << 1) | 1); goto l327; } if (fmt2 == (sixtyFourBitIndexableFormat())) { @@ -10840,7 +10840,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l327; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -10904,7 +10904,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l327; } } @@ -10961,7 +10961,7 @@ interpret(void) sqInt totalLength; sqInt totalLength1; usqLong val64ToPut; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut1); @@ -11322,7 +11322,7 @@ interpret(void) } sz = 0; l357: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11372,7 +11372,7 @@ interpret(void) } sz = 0; l356: /* end lengthOf:format: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11699,7 +11699,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), top); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((instVarIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -11835,7 +11835,7 @@ interpret(void) } if (index == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l389; } if (index == InstructionPointerIndex) { @@ -12003,7 +12003,7 @@ interpret(void) extB = 0; /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), ((value << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); } break; case 489: /*233*/ @@ -12354,7 +12354,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12422,7 +12422,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), value); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12590,7 +12590,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((variableIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12657,7 +12657,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((ValueIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -12823,7 +12823,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (receiverIsOnStack) { startIndex = FullClosureReceiverIndex; @@ -12927,10 +12927,10 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -13040,7 +13040,7 @@ interpret(void) } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l455; } if (slotIndex == InstructionPointerIndex) { @@ -13208,7 +13208,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13387,7 +13387,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), anObject); /* begin internalPush: */ - longAtPointerput((localSP -= BytesPerOop), (((slotIndex + 1) << 1) | 1)); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; @@ -13923,7 +13923,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { /* begin knownClassAtIndex: */ @@ -14037,13 +14037,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -14052,10 +14131,10 @@ positive32BitValueOf(sqInt oop) usqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -14099,6 +14178,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } + } @@ -14179,7 +14259,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -14224,14 +14304,14 @@ positiveMachineIntegerValueOf(sqInt oop) fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -14252,7 +14332,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -14735,11 +14815,11 @@ primitiveAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -14828,7 +14908,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt totalLength1; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -15344,7 +15424,7 @@ primitiveBehaviorHash(void) : -PrimErrBadReceiver)); if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15386,10 +15466,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15397,7 +15477,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15412,28 +15492,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -15446,10 +15526,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -15457,7 +15537,7 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15472,28 +15552,28 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -15564,10 +15644,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (oop1 & (tagMask())) { @@ -15575,7 +15655,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15590,28 +15670,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -15624,10 +15704,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (oop2 & (tagMask())) { @@ -15635,7 +15715,7 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15650,28 +15730,28 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -15772,7 +15852,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -15939,10 +16019,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l3; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l3; } if (integerArgument & (tagMask())) { @@ -15950,7 +16030,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -15965,28 +16045,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l3; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); goto l3; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l3; } l3: /* end positiveMachineIntegerValueOf: */; @@ -15998,10 +16078,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l6; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l6; } if (integerReceiver & (tagMask())) { @@ -16009,7 +16089,7 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -16024,28 +16104,28 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } /* begin numBytesOfBytes: */ fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); goto l6; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l6; } l6: /* end positiveMachineIntegerValueOf: */; @@ -16129,7 +16209,7 @@ primitiveBytesLeft(void) if (!GIV(primFailCode)) { /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -16448,7 +16528,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop))); - longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -16569,7 +16649,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop1))); - longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isForwarded(objOop4))); @@ -16588,7 +16668,7 @@ primitiveClockLogAddresses(void) /* begin storePointerUnchecked:ofObject:withValue: */ objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; assert(!(isOopForwarded(objOop2))); - longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -17274,7 +17354,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -17487,7 +17567,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17550,7 +17630,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17922,7 +18002,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19767,10 +19847,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & (tagMask())) == 0) @@ -19788,7 +19868,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -19827,7 +19907,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -19845,7 +19925,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(arg))); - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -19978,10 +20058,10 @@ primitiveGetWindowSize(void) l6: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -20101,7 +20181,7 @@ primitiveGrowMemoryByAtLeast(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((segSize << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20266,7 +20346,7 @@ primitiveIdentityHash(void) long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); } integerVal = hash; - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } } @@ -20295,7 +20375,7 @@ primitiveImageFormatVersion(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { - oop = ((6521 << 1) | 1); + oop = (((usqInt)6521 << 1) | 1); goto l4; } /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -20511,7 +20591,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -20606,7 +20686,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20659,7 +20739,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -20750,7 +20834,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -20874,7 +20958,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l4; } @@ -20966,7 +21050,7 @@ primitiveInvokeObjectAsMethod(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -21068,7 +21152,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21098,7 +21182,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -21567,7 +21651,7 @@ primitiveMaxIdentityHash(void) /* begin pop:thenPushInteger: */ integerVal = identityHashHalfWordMask(); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -21596,7 +21680,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -21612,7 +21696,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -21629,7 +21713,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21710,7 +21794,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -21798,10 +21882,10 @@ primitiveMousePoint(void) l7: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -21869,7 +21953,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -22195,7 +22279,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop1; sqInt reasonCode; - unsigned long size; + usqIntptr_t size; char *sp; sqInt value; @@ -22241,7 +22325,7 @@ primitiveNewWithArg(void) fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -22249,7 +22333,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))); goto l5; @@ -22452,7 +22536,7 @@ primitiveNextObject(void) instance = accessibleObjectAfter(longAt(GIV(stackPointer))); if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22894,7 +22978,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(stack))); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -23129,7 +23213,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23221,7 +23305,7 @@ primitivePerformInSuperclass(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23350,7 +23434,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l6; } @@ -23442,7 +23526,7 @@ primitivePerformWithArgs(void) goto l8; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l8: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -23666,7 +23750,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24001,7 +24085,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24013,7 +24097,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24062,7 +24146,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24074,7 +24158,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24101,7 +24185,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -24113,7 +24197,7 @@ primitiveScanCharacters(void) if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(rcvr))); - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -24148,7 +24232,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -24244,10 +24328,10 @@ primitiveScreenSize(void) l5: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -24703,7 +24787,7 @@ primitiveSetOrHasIdentityHash(void) allInstancesOf(thisReceiver); } /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -24859,7 +24943,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -24914,7 +24998,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -25168,7 +25252,7 @@ primitiveSize(void) fixedFields = (((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -25256,7 +25340,7 @@ primitiveSizeInBytesOfInstance(void) goto l1; } - if (numSlots >= (((long)((usqInt)((((long)1))) << ((BytesPerOop * 8) - 2))))) { + if (numSlots >= ((((usqInt)1)) << ((BytesPerOop * 8) - 2))) { code = (nElements < 0 ? PrimErrBadArgument : PrimErrLimitExceeded); @@ -25632,11 +25716,11 @@ primitiveStringAt(void) goto l10; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l10; } if (fmt >= (firstShortFormat())) { - result = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + result = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l10; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -25732,7 +25816,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -26201,7 +26285,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26644,7 +26728,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26928,7 +27012,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -26983,7 +27067,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); assert(!(isOopForwarded(resultArray))); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -27070,7 +27154,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -27092,7 +27176,7 @@ primitiveWait(void) if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(sema))); - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -27163,83 +27247,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - if (oop & (tagMask())) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex1 = (longAt(oop)) & (classIndexMask()); - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - assert(!(isImmediate(oop))); - ccIndex = (longAt(oop)) & (classIndexMask()); - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -27342,20 +27357,20 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; usqInt numBytes; usqInt numSlots; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -27420,14 +27435,14 @@ signedMachineIntegerValueOf(sqInt oop) } bs = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); l3: /* end numBytesOf: */; - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); } @@ -27436,7 +27451,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -27545,7 +27560,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -28565,9 +28580,9 @@ integerObjectOf(sqInt value) sqInt integerValueOf(sqInt oop) { - return ((((usqInt) oop >> 31)) == 1 - ? (((((usqInt) oop >> 1)) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 - : ((usqInt) oop >> 1)); + return ((((usqInt) oop) >> 0x1F) == 1 + ? (((((usqInt) oop) >> 1) & 0x3FFFFFFF) - 0x3FFFFFFF) - 1 + : ((usqInt) oop) >> 1); } /* Spur32BitMemoryManager>>#isIntegerObject: */ @@ -31270,7 +31285,7 @@ allInstancesOf(sqInt aClass) /* can't split a single word */ freeObject(freeChunk); - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (count < (numSlotsMask())) { /* begin allocateSlots:format:classIndex: */ @@ -31579,7 +31594,7 @@ allObjects(void) if (((checkForLeaks & (GCModeFreeSpace | GCModeFull)) == (GCModeFreeSpace | GCModeFull))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } bytes = (BaseHeaderSize + BaseHeaderSize) + ((count + (count & 1)) * BytesPerOop); start = ((byteAt(freeChunk + 7)) == (numSlotsMask()) @@ -37487,7 +37502,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - unsigned long headroom; + usqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -40832,7 +40847,7 @@ markAndTrace(sqInt objOop) if ((topOfObjStack(GIV(markStack))) != objToScan) { pushonObjStack(objToScan, GIV(markStack)); } - pushonObjStack(((index << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)index << 1) | 1), GIV(markStack)); } objToScan = field; index = -1; @@ -40896,7 +40911,7 @@ markAndTrace(sqInt objOop) pushonObjStack(field, GIV(markStack)); if (((byteAt(field + 7)) > 64) && (((numStrongSlots = numStrongSlotsOfInephemeral(field))) > 64)) { - pushonObjStack(((numStrongSlots << 1) | 1), GIV(markStack)); + pushonObjStack((((usqInt)numStrongSlots << 1) | 1), GIV(markStack)); } l2: ; @@ -44811,7 +44826,7 @@ printOopsFromto(sqInt startAddress, sqInt endAddress) sqInt oop; oop = objectBefore(startAddress); - limit = (((((unsigned long)endAddress)) < GIV(endOfMemory)) ? (((unsigned long)endAddress)) : GIV(endOfMemory)); + limit = (((((usqIntptr_t)endAddress)) < GIV(endOfMemory)) ? (((usqIntptr_t)endAddress)) : GIV(endOfMemory)); oop = (oop == null ? startAddress : ((objectAfter(oop)) == startAddress @@ -46262,7 +46277,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (((checkForLeaks & (GCModeFreeSpace | GCModeImageSegment)) == (GCModeFreeSpace | GCModeImageSegment))) { runLeakCheckerForFreeSpace(GCModeFreeSpace); } - arrayOfObjects = ((count << 1) | 1); + arrayOfObjects = (((usqInt)count << 1) | 1); goto l13; } /* begin setFormatOf:to: */ @@ -47080,7 +47095,7 @@ addSegmentOfSize(sqInt ammount) segAddress = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount, firstGapOfSizeAtLeast(ammount), (&allocatedSize)); if (!(segAddress == null)) { /* begin insertSegmentFor: */ - segAddress1 = ((unsigned long)segAddress); + segAddress1 = ((usqIntptr_t)segAddress); assert(segAddress1 >= (segLimit(&GIV(segments)[0]))); if (GIV(numSegments) == GIV(numSegInfos)) { allocateOrExtendSegmentInfos(); @@ -47101,7 +47116,7 @@ addSegmentOfSize(sqInt ammount) } l1: /* end insertSegmentFor: */; newSeg = (&(GIV(segments)[newSegIndex])); - (newSeg->segStart = ((unsigned long)segAddress)); + (newSeg->segStart = ((usqIntptr_t)segAddress)); (newSeg->segSize = allocatedSize); bridgeFromto((&(GIV(segments)[newSegIndex - 1])), newSeg); bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1)) @@ -47699,7 +47714,7 @@ shrinkObjectMemory(usqInt delta) if ((shrinkage >= (((seg->segSize)) * 0.75)) && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; - delta1 = SQABS((((seg->segSize)) - shrinkage)); + delta1 = SQABS((((sqInt) (((seg->segSize)) - shrinkage)))); } } } @@ -47996,7 +48011,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -48009,7 +48024,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = (ensureBehaviorHash(classObj)); GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -48101,7 +48116,7 @@ static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((characterObj & (tagMask())) == (characterTag())) { - return ((usqInt) (((unsigned long) characterObj))) >> 1; + return ((usqInt) (((usqInt) characterObj))) >> 1; } GIV(primFailCode) = PrimErrBadArgument; return ConstZero; @@ -48895,7 +48910,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -49284,7 +49299,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return (pc == encodedip) || (((methodHeader = methodHeaderOf(longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))))), (methodHeader & AlternateHeaderHasPrimFlag) @@ -49592,7 +49607,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -49682,7 +49697,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); @@ -50447,7 +50462,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); assert(!(isOopForwarded(ctxt))); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ @@ -50693,7 +50708,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -50835,7 +50850,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -52297,7 +52312,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -52464,18 +52479,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -52493,7 +52496,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -53062,7 +53065,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -53822,10 +53825,10 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) l4: /* end eeInstantiateSmallClass:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(pointResult))); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -54233,7 +54236,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -54366,7 +54369,7 @@ marryFrameSP(char *theFP, char *theSP) longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); @@ -54747,7 +54750,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt objFormat; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -55133,7 +55136,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt newLargeInteger; usqInt newObj; @@ -56262,7 +56265,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -57043,12 +57046,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -57076,7 +57079,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -57580,7 +57583,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -58051,7 +58054,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -58078,11 +58081,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -59188,7 +59191,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -59403,7 +59406,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -59558,7 +59561,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -59738,6 +59741,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & (tagMask())) == 0) @@ -59751,9 +59755,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -59997,14 +60006,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -60258,7 +60267,7 @@ snapshot(sqInt embedded) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(activeContext))); - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } postSnapshot(); marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); @@ -60333,7 +60342,7 @@ snapshot(sqInt embedded) goto l6; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l6: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -60387,8 +60396,8 @@ specialSelector(sqInt index) static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; - long c1; + sqIntptr_t c; + sqIntptr_t c1; sqInt first; sqInt i; sqInt i1; @@ -60400,7 +60409,7 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt iLimiT1; sqInt last; sqInt list; - long m; + sqIntptr_t m; sqInt next; sqInt obj; sqInt obj1; @@ -60423,8 +60432,8 @@ spurPostBecomeAction(sqInt theBecomeEffectsFlags) sqInt referent4; sqInt referent5; sqInt referent6; - long s; - long s1; + sqIntptr_t s; + sqIntptr_t s1; sqInt sched; sqInt schedAssoc; sqInt xArray; @@ -60923,7 +60932,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bs; @@ -60942,16 +60951,16 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } if (integerPointer & (tagMask())) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ assert(!(isImmediate(integerPointer))); @@ -60965,25 +60974,25 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } /* begin numBytesOfBytes: */ fmt = (((usqInt) (longAt(integerPointer))) >> (formatShift())) & (formatMask()); assert(fmt >= (firstByteFormat())); bs = ((numSlotsOf(integerPointer)) << (shiftForWord())) - (fmt & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerPointer + BaseHeaderSize) + (0U << 3)))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -60991,7 +61000,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -61134,10 +61143,10 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } if (fmt >= (firstShortFormat())) { - return (((shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + return (((usqInt)(shortAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); } if (fmt == (sixtyFourBitIndexableFormat())) { return positive64BitIntegerFor(long64At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); @@ -61215,7 +61224,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = long64At(array); fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); @@ -61375,7 +61384,7 @@ storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integ if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(objectPointer))); - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -61577,7 +61586,7 @@ synchronousSignal(sqInt aSemaphore) if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(aSemaphore))); - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -61919,7 +61928,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -62725,10 +62734,10 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -62887,11 +62896,11 @@ primitiveContextAt(void) goto l17; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l17; } if (fmt1 >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))))) << 1) | 1); goto l17; } if (fmt1 == (sixtyFourBitIndexableFormat())) { @@ -63036,11 +63045,11 @@ primitiveContextAt(void) goto l4; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l4; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((aContext + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))) << 1) | 1); goto l4; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -63157,8 +63166,8 @@ primitiveContextAtPut(void) sqInt totalLength1; usqLong unsigned64BitValueToStore; usqLong unsigned64BitValueToStore1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -63585,7 +63594,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -63621,7 +63630,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -64040,7 +64049,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -64050,7 +64059,7 @@ primitiveDoPrimitiveWithArgs(void) /* Run the primitive (sets primFailCode) */ GIV(tempOop) = argumentArray; GIV(tempOop3) = GIV(newMethod); - GIV(newMethod) = ((primIdx << 1) | 1); + GIV(newMethod) = (((usqInt)primIdx << 1) | 1); /* begin slowPrimitiveResponse */ assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); assert((remapBufferCount()) == 0); @@ -64089,7 +64098,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -64165,7 +64174,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -64257,7 +64266,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -64368,7 +64377,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -64460,7 +64469,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -64679,12 +64688,12 @@ primitiveExternalCall(void) l2: /* end addToExternalPrimitiveTable: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), ((accessorDepth << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)accessorDepth << 1) | 1)); } /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(lit))); - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -64958,7 +64967,7 @@ primitiveFullGC(void) assert(pageListIsWellFormed()); /* begin pop:thenPushInteger: */ integerVal = ((sqInt) (fullGC())); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; @@ -64967,7 +64976,7 @@ primitiveFullGC(void) fullGC(); /* begin pop:thenPushInteger: */ integerVal1 = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -65007,7 +65016,7 @@ primitiveIncrementalGC(void) /* begin pop:thenPushInteger: */ integerVal = (((GIV(totalFreeOldSpace) + ((((eden()).limit)) - GIV(freeStart))) + ((((pastSpace()).limit)) - GIV(pastSpaceStart))) + ((((futureSpace()).limit)) - (((futureSpace()).limit)))) - (interpreterAllocationReserveBytes()); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -65107,11 +65116,11 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } if (fmt >= (firstShortFormat())) { - value = (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); + value = (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))))) << 1) | 1); goto l2; } if (fmt == (sixtyFourBitIndexableFormat())) { @@ -65189,7 +65198,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt totalLength; usqLong unsigned64BitValueToStore; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -65618,7 +65627,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l2; } @@ -65710,7 +65719,7 @@ primitivePerform(void) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -66003,7 +66012,7 @@ primitiveSlotAt(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -66018,7 +66027,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -66045,9 +66054,9 @@ primitiveSlotAt(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -66056,9 +66065,9 @@ primitiveSlotAt(void) } if (fmt >= (firstShortFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))))) << 1) | 1)); GIV(stackPointer) = sp2; return; } @@ -66067,7 +66076,7 @@ primitiveSlotAt(void) } if (fmt == (sixtyFourBitIndexableFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 3))))); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -66079,7 +66088,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -66167,7 +66176,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp2; char *sp4; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -66201,7 +66210,7 @@ primitiveSlotAtPut(void) numSlots = (numSlots1 == (numSlotsMask()) ? longAt(rcvr - BaseHeaderSize) : numSlots1); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((longAt(rcvr)) & (classIndexMask())) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -66270,7 +66279,7 @@ primitiveSlotAtPut(void) fmt2 = (((usqInt) (longAt(newValue))) >> (formatShift())) & (formatMask()); assert(fmt2 >= (firstByteFormat())); bs = ((numSlotsOf(newValue)) << (shiftForWord())) - (fmt2 & 7); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -66278,7 +66287,7 @@ primitiveSlotAtPut(void) value = 0; goto l6; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((newValue + BaseHeaderSize) + (0U << 3)))); goto l6; @@ -66297,7 +66306,7 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } @@ -66305,7 +66314,7 @@ primitiveSlotAtPut(void) fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); assert(fmt1 >= (firstByteFormat())); numSlots = ((numSlotsOf(rcvr)) << (shiftForWord())) - (fmt1 & 7); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66316,12 +66325,12 @@ primitiveSlotAtPut(void) return; } if (fmt >= (firstShortFormat())) { - if ((((unsigned long)value)) > 0xFFFF) { + if ((((usqInt)value)) > 0xFFFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = ((usqInt) (numBytesOf(rcvr))) >> 1; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 1))), value); /* begin pop:thenPush: */ longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66333,7 +66342,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -66450,7 +66459,7 @@ primitiveStoreStackp(void) assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -66949,17 +66958,17 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((GIV(statScavenges)) << 1) | 1); + valuePointer9 = (((usqInt)(GIV(statScavenges)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -66968,7 +66977,7 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); @@ -66995,80 +67004,80 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((rootTableCount()) << 1) | 1); + valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer13 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompactPassCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompactPassCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((0 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)0 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), ((6521 << 1) | 1)); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), (((usqInt)6521 << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer14 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); @@ -67076,7 +67085,7 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = ((((((GIV(preemptionYields) + valuePointer15 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -67084,15 +67093,15 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((rootTableCapacity()) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((numSegments()) << 1) | 1); + valuePointer1 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -67215,13 +67224,13 @@ primitiveVMParameter(void) assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((((((1) + ((IMMUTABILITY + valuePointer24 = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((stackPageByteSize()) << 1) | 1); + valuePointer25 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -67245,15 +67254,15 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer27 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer28 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer29 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer29); assert(paramsArraySize == 71); @@ -67297,22 +67306,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statScavenges)) << 1) | 1); + result = (((usqInt)(GIV(statScavenges)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statScavengeGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -67324,43 +67333,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = (((rootTableCount()) << 1) | 1); + result = (((usqInt)(rootTableCount()) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 29) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompactPassCount) << 1) | 1); + result = (((usqInt)GIV(statCompactPassCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -67368,37 +67377,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((0 << 1) | 1); + result = (((usqInt)0 << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = ((6521 << 1) | 1); + result = (((usqInt)6521 << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -67407,21 +67416,21 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = (((rootTableCapacity()) << 1) | 1); + result = (((usqInt)(rootTableCapacity()) << 1) | 1); } if ((arg == 53) && (1)) { - result = (((numSegments()) << 1) | 1); + result = (((usqInt)(numSegments()) << 1) | 1); } if ((arg == 54) && (1)) { @@ -67459,12 +67468,12 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((1) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if ((arg == 67) && (1)) { @@ -67474,13 +67483,13 @@ primitiveVMParameter(void) result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -67532,7 +67541,7 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = (((((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; @@ -67543,13 +67552,13 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { /* begin shrinkThreshold: */ GIV(shrinkThreshold) = arg; @@ -67558,7 +67567,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -67569,7 +67578,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67578,7 +67587,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67586,7 +67595,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -67594,7 +67603,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -67614,7 +67623,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/spurstacksrc/vm/vmCallback.h b/spurstacksrc/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/spurstacksrc/vm/vmCallback.h +++ b/spurstacksrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/src/plugins/AioPlugin/AioPlugin.c b/src/plugins/AioPlugin/AioPlugin.c index 9cce5ce8e3..94217b56ba 100644 --- a/src/plugins/AioPlugin/AioPlugin.c +++ b/src/plugins/AioPlugin/AioPlugin.c @@ -1,5 +1,5 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from UnixAioPlugin VMConstruction-Plugins-AioPlugin-eem.18 uuid: c426ab70-05a2-43a1-a899-e324aaf8f92f */ @@ -43,7 +43,7 @@ static char __buildInfo[] = "UnixAioPlugin VMConstruction-Plugins-AioPlugin-eem. static void aioForwardwithDataandFlags(int fd, void *data, int flags); static sqInt fileDescriptorFrom(sqInt aSQFileByteArray); static FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray); -static usqInt fileRecordSize(void); +static usqIntptr_t fileRecordSize(void); static SQFile * fileValueOf(sqInt anSQFileRecord); EXPORT(const char*) getModuleName(void); static sqInt getThisSessionIdentifier(void); @@ -66,7 +66,7 @@ static SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); EXPORT(sqInt) shutdownModule(void); static int socketDescriptorFrom(sqInt sqSocketOop); -static usqInt socketRecordSize(void); +static usqIntptr_t socketRecordSize(void); static SQSocket * socketValueOf(sqInt anSQSocketRecord); static sqInt stringFromCString(const char *aCString); static char * versionString(void); @@ -179,7 +179,7 @@ fileHandleFrom(sqInt sqFileStructByteArray) /* Answer the size of a SQFile data structure in bytes. */ /* AioPlugin>>#fileRecordSize */ -static usqInt +static usqIntptr_t fileRecordSize(void) { return sizeof(SQFile); @@ -656,7 +656,7 @@ socketDescriptorFrom(sqInt sqSocketOop) /* Answer the size of a SQSocket data structure in bytes. */ /* AioPlugin>>#socketRecordSize */ -static usqInt +static usqIntptr_t socketRecordSize(void) { return sizeof(SQSocket); diff --git a/src/plugins/BitBltPlugin/BitBltPlugin.c b/src/plugins/BitBltPlugin/BitBltPlugin.c index 6b1425ed8c..c0343aae1d 100644 --- a/src/plugins/BitBltPlugin/BitBltPlugin.c +++ b/src/plugins/BitBltPlugin/BitBltPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - BitBltSimulation VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + BitBltSimulation VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; @@ -344,9 +344,9 @@ static int maskTable[33] = { }; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BitBltPlugin VMMaker.oscog-eem.1975 (i)" + "BitBltPlugin VMMaker.oscog-nice.1989 (i)" #else - "BitBltPlugin VMMaker.oscog-eem.1975 (e)" + "BitBltPlugin VMMaker.oscog-nice.1989 (e)" #endif ; static sqInt noHalftone; @@ -3782,7 +3782,7 @@ lockSurfaces(void) { sqInt b; sqInt destHandle; - sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt); + sqIntptr_t (*fn)(sqIntptr_t, int*, int, int, int, int); sqInt l; sqInt r; sqInt sourceHandle; @@ -3797,7 +3797,7 @@ lockSurfaces(void) return null; } } - fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn); + fn = ((sqIntptr_t (*)(sqIntptr_t, int*, int, int, int, int)) lockSurfaceFn); destHandle = fetchIntegerofObject(FormBitsIndex, destForm); if ((sourceBits == 0) && (!noSource)) { @@ -3846,7 +3846,7 @@ lockSurfaces(void) } /* Warping requiring the entire surface */ - fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn); + fn = ((sqIntptr_t (*)(sqIntptr_t, int*, int, int, int, int)) lockSurfaceFn); if (isWarping) { sourceBits = fn(sourceHandle, &sourcePitch, 0, 0, sourceWidth, sourceHeight); } @@ -4892,8 +4892,8 @@ pixSwapwith(unsigned int sourceWord, unsigned int destWord) EXPORT(sqInt) primitiveCompareColors(void) { - unsigned long colorA; - unsigned long colorB; + usqIntptr_t colorA; + usqIntptr_t colorB; sqInt rcvr; sqInt testID; sqInt val; @@ -5526,7 +5526,7 @@ queryDestSurface(sqInt handle) return 0; } } - return ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn) + return ((int (*) (sqIntptr_t, int*, int*, int*, int*))querySurfaceFn) (handle, &destWidth, &destHeight, &destDepth, &destMSB); } @@ -5547,7 +5547,7 @@ querySourceSurface(sqInt handle) return 0; } } - return ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn) + return ((int (*) (sqIntptr_t, int*, int*, int*, int*))querySurfaceFn) (handle, &sourceWidth, &sourceHeight, &sourceDepth, &sourceMSB); } @@ -5709,14 +5709,14 @@ rgbComponentAlpha16(void) static sqInt rgbComponentAlpha32(void) { - register long deltaX; + register sqInt deltaX; sqInt deltaY; unsigned int destWord; - register long dstIndex; + register sqIntptr_t dstIndex; sqInt dstY; unsigned int sourceWord; unsigned int srcAlpha; - register long srcIndex; + register sqIntptr_t srcIndex; sqInt srcY; @@ -6957,7 +6957,7 @@ unlockSurfaces(void) { sqInt destHandle; sqInt destLocked; - sqInt (*fn)(sqInt, sqInt, sqInt, sqInt, sqInt); + int (*fn)(sqIntptr_t, int, int, int, int); sqInt sourceHandle; if (hasSurfaceLock) { @@ -6966,7 +6966,7 @@ unlockSurfaces(void) return null; } } - fn = ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt)) unlockSurfaceFn); + fn = ((int (*)(sqIntptr_t, int, int, int, int)) unlockSurfaceFn); destLocked = 0; destHandle = fetchPointerofObject(FormBitsIndex, destForm); if (isIntegerObject(destHandle)) { diff --git a/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c b/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c index e79bf3fd27..a07f80de4c 100644 --- a/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c +++ b/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - BochsIA32Plugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 + BochsIA32Plugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 */ -static char __buildInfo[] = "BochsIA32Plugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 " __DATE__ ; +static char __buildInfo[] = "BochsIA32Plugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 " __DATE__ ; @@ -42,7 +42,7 @@ static char __buildInfo[] = "BochsIA32Plugin Cog-eem.316 uuid: 9eb6d25c-959b-485 /*** Function Prototypes ***/ static void forceStopOnInterrupt(void); EXPORT(const char*) getModuleName(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveDisassembleAtInMemory(void); EXPORT(sqInt) primitiveErrorAndLog(void); EXPORT(sqInt) primitiveFlushICacheFromTo(void); @@ -115,9 +115,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BochsIA32Plugin Cog-eem.316 (i)" + "BochsIA32Plugin * Cog-eem.329 (i)" #else - "BochsIA32Plugin Cog-eem.316 (e)" + "BochsIA32Plugin * Cog-eem.329 (e)" #endif ; @@ -146,7 +146,7 @@ getModuleName(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -165,7 +165,7 @@ positiveMachineIntegerFor(unsigned long value) EXPORT(sqInt) primitiveDisassembleAtInMemory(void) { - unsigned long address; + usqIntptr_t address; void *cpu; sqInt cpuAlien; sqInt instrLenOrErr; @@ -192,7 +192,7 @@ primitiveDisassembleAtInMemory(void) primitiveFailFor(PrimErrBadReceiver); return null; } - instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize))); + instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize))); if (instrLenOrErr < 0) { primitiveFailFor(PrimErrInappropriate); return null; @@ -272,8 +272,8 @@ primitiveFlushICacheFromTo(void) { void *cpu; sqInt cpuAlien; - unsigned long endAddress; - unsigned long startAddress; + usqIntptr_t endAddress; + usqIntptr_t startAddress; startAddress = (BytesPerOop == 4 ? positive32BitValueOf(stackValue(1)) @@ -366,12 +366,12 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -398,7 +398,7 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { @@ -430,8 +430,8 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -455,7 +455,7 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); @@ -484,12 +484,12 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -512,7 +512,7 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) primitiveFailFor(PrimErrBadReceiver); return null; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); @@ -542,8 +542,8 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -563,7 +563,7 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) primitiveFailFor(PrimErrBadReceiver); return null; } - maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); return null; diff --git a/src/plugins/BochsX64Plugin/BochsX64Plugin.c b/src/plugins/BochsX64Plugin/BochsX64Plugin.c index 026998ebe9..a4f508419d 100644 --- a/src/plugins/BochsX64Plugin/BochsX64Plugin.c +++ b/src/plugins/BochsX64Plugin/BochsX64Plugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - BochsX64Plugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 + BochsX64Plugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 */ -static char __buildInfo[] = "BochsX64Plugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 " __DATE__ ; +static char __buildInfo[] = "BochsX64Plugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 " __DATE__ ; @@ -42,7 +42,7 @@ static char __buildInfo[] = "BochsX64Plugin Cog-eem.316 uuid: 9eb6d25c-959b-4852 /*** Function Prototypes ***/ static void forceStopOnInterrupt(void); EXPORT(const char*) getModuleName(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveDisassembleAtInMemory(void); EXPORT(sqInt) primitiveErrorAndLog(void); EXPORT(sqInt) primitiveFlushICacheFromTo(void); @@ -115,9 +115,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BochsX64Plugin Cog-eem.316 (i)" + "BochsX64Plugin * Cog-eem.329 (i)" #else - "BochsX64Plugin Cog-eem.316 (e)" + "BochsX64Plugin * Cog-eem.329 (e)" #endif ; @@ -146,7 +146,7 @@ getModuleName(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -165,7 +165,7 @@ positiveMachineIntegerFor(unsigned long value) EXPORT(sqInt) primitiveDisassembleAtInMemory(void) { - unsigned long address; + usqIntptr_t address; void *cpu; sqInt cpuAlien; sqInt instrLenOrErr; @@ -192,7 +192,7 @@ primitiveDisassembleAtInMemory(void) primitiveFailFor(PrimErrBadReceiver); return null; } - instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize))); + instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize))); if (instrLenOrErr < 0) { primitiveFailFor(PrimErrInappropriate); return null; @@ -272,8 +272,8 @@ primitiveFlushICacheFromTo(void) { void *cpu; sqInt cpuAlien; - unsigned long endAddress; - unsigned long startAddress; + usqIntptr_t endAddress; + usqIntptr_t startAddress; startAddress = (BytesPerOop == 4 ? positive32BitValueOf(stackValue(1)) @@ -366,12 +366,12 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -398,7 +398,7 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { @@ -430,8 +430,8 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -455,7 +455,7 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); @@ -484,12 +484,12 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -512,7 +512,7 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) primitiveFailFor(PrimErrBadReceiver); return null; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); @@ -542,8 +542,8 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -563,7 +563,7 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) primitiveFailFor(PrimErrBadReceiver); return null; } - maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); return null; diff --git a/src/plugins/FileCopyPlugin/FileCopyPlugin.c b/src/plugins/FileCopyPlugin/FileCopyPlugin.c index 0e18b853bb..8121aee63d 100644 --- a/src/plugins/FileCopyPlugin/FileCopyPlugin.c +++ b/src/plugins/FileCopyPlugin/FileCopyPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - FileCopyPlugin VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 + FileCopyPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "FileCopyPlugin VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 " __DATE__ ; +static char __buildInfo[] = "FileCopyPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -64,9 +64,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "FileCopyPlugin VMMaker.oscog-eem.1699 (i)" + "FileCopyPlugin VMMaker.oscog-nice.1982 (i)" #else - "FileCopyPlugin VMMaker.oscog-eem.1699 (e)" + "FileCopyPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -101,8 +101,8 @@ primitiveFileCopyNamedTo(void) if (failed()) { return null; } - srcSz = slotSizeOf(((sqInt)(long)(srcName) - BaseHeaderSize)); - dstSz = slotSizeOf(((sqInt)(long)(dstName) - BaseHeaderSize)); + srcSz = slotSizeOf(((sqInt)(sqIntptr_t)(srcName) - BaseHeaderSize)); + dstSz = slotSizeOf(((sqInt)(sqIntptr_t)(dstName) - BaseHeaderSize)); ok = sqCopyFilesizetosize(srcName, srcSz, dstName, dstSz); if (!ok) { primitiveFail(); diff --git a/src/plugins/FilePlugin/FilePlugin.c b/src/plugins/FilePlugin/FilePlugin.c index 453286dfad..6a386aeab5 100644 --- a/src/plugins/FilePlugin/FilePlugin.c +++ b/src/plugins/FilePlugin/FilePlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - FilePlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + FilePlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "FilePlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "FilePlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -56,7 +56,7 @@ static char __buildInfo[] = "FilePlugin VMMaker.oscog-eem.1975 uuid: 76250913-23 /*** Function Prototypes ***/ static sqInt asciiDirectoryDelimiter(void); EXPORT(sqInt) fileOpenNamesizewritesecure(char *nameIndex, sqInt nameSize, sqInt writeFlag, sqInt secureFlag); -extern usqInt fileRecordSize(void); +extern usqIntptr_t fileRecordSize(void); extern SQFile * fileValueOf(sqInt objectPointer); EXPORT(const char*) getModuleName(void); EXPORT(sqInt) getThisSession(void); @@ -189,9 +189,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "FilePlugin VMMaker.oscog-eem.1975 (i)" + "FilePlugin VMMaker.oscog-nice.1982 (i)" #else - "FilePlugin VMMaker.oscog-eem.1975 (e)" + "FilePlugin VMMaker.oscog-nice.1982 (e)" #endif ; static void * sCCPfn; @@ -259,7 +259,7 @@ fileOpenNamesizewritesecure(char *nameIndex, sqInt nameSize, sqInt writeFlag, sq /* Return the size of a Smalltalk file record in bytes. */ /* FilePlugin>>#fileRecordSize */ -usqInt +usqIntptr_t fileRecordSize(void) { return sizeof(SQFile); diff --git a/src/plugins/GdbARMPlugin/GdbARMPlugin.c b/src/plugins/GdbARMPlugin/GdbARMPlugin.c index d87784cba1..bfa95308ab 100644 --- a/src/plugins/GdbARMPlugin/GdbARMPlugin.c +++ b/src/plugins/GdbARMPlugin/GdbARMPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - GdbARMPlugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 + GdbARMPlugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 */ -static char __buildInfo[] = "GdbARMPlugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-bd48-adaf01ecc4c3 " __DATE__ ; +static char __buildInfo[] = "GdbARMPlugin * Cog-eem.329 uuid: d6e9861d-2c8f-4f97-b544-80637888b569 " __DATE__ ; @@ -42,6 +42,7 @@ static char __buildInfo[] = "GdbARMPlugin Cog-eem.316 uuid: 9eb6d25c-959b-4852-b /*** Function Prototypes ***/ static void forceStopOnInterrupt(void); EXPORT(const char*) getModuleName(void); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveDisassembleAtInMemory(void); EXPORT(sqInt) primitiveErrorAndLog(void); EXPORT(sqInt) primitiveFlushICacheFromTo(void); @@ -75,6 +76,7 @@ static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*popRemappableOop)(void); static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); +static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); static sqInt (*primitiveFail)(void); static sqInt (*primitiveFailFor)(sqInt reasonCode); @@ -99,6 +101,7 @@ extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt popRemappableOop(void); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); +extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primitiveFail(void); extern sqInt primitiveFailFor(sqInt reasonCode); @@ -112,9 +115,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "GdbARMPlugin Cog-eem.316 (i)" + "GdbARMPlugin * Cog-eem.329 (i)" #else - "GdbARMPlugin Cog-eem.316 (e)" + "GdbARMPlugin * Cog-eem.329 (e)" #endif ; @@ -141,6 +144,15 @@ getModuleName(void) return moduleName; } + /* InterpreterPlugin>>#positiveMachineIntegerFor: */ +static sqInt +positiveMachineIntegerFor(usqIntptr_t value) +{ + return (BytesPerWord == 8 + ? positive64BitIntegerFor(value) + : positive32BitIntegerFor(value)); +} + /* cpuAlien */ /* */ @@ -153,7 +165,7 @@ getModuleName(void) EXPORT(sqInt) primitiveDisassembleAtInMemory(void) { - unsigned long address; + usqIntptr_t address; void *cpu; sqInt cpuAlien; sqInt instrLenOrErr; @@ -180,7 +192,7 @@ primitiveDisassembleAtInMemory(void) primitiveFailFor(PrimErrBadReceiver); return null; } - instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize))); + instrLenOrErr = disassembleForAtInSize(cpu, address, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize))); if (instrLenOrErr < 0) { primitiveFailFor(PrimErrInappropriate); return null; @@ -260,8 +272,8 @@ primitiveFlushICacheFromTo(void) { void *cpu; sqInt cpuAlien; - unsigned long endAddress; - unsigned long startAddress; + usqIntptr_t endAddress; + usqIntptr_t startAddress; startAddress = (BytesPerOop == 4 ? positive32BitValueOf(stackValue(1)) @@ -298,7 +310,9 @@ primitiveNewCPU(void) primitiveFail(); return null; } - popthenPush(1, positive32BitIntegerFor(((unsigned long) cpu))); + popthenPush(1, (BytesPerWord == 8 + ? positive64BitIntegerFor(((usqIntptr_t) cpu)) + : positive32BitIntegerFor(((usqIntptr_t) cpu)))); if (failed()) { return null; } @@ -352,12 +366,12 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -384,7 +398,7 @@ primitiveRunInMemoryMinAddressMaxAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { @@ -417,8 +431,8 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -442,7 +456,7 @@ primitiveRunInMemoryMinimumAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = runCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); @@ -472,12 +486,12 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) { void *cpu; sqInt cpuAlien; - unsigned long maxAddress; + usqIntptr_t maxAddress; sqInt maybeErr; char *memory; sqInt memorySize; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(3))); memory = ((char *) (firstIndexableField(stackValue(3)))); @@ -504,7 +518,7 @@ primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void) if (prevInterruptCheckChain == (forceStopOnInterrupt)) { prevInterruptCheckChain == 0; } - memorySize = byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)); + memorySize = byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)); maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, ((memorySize < maxAddress) ? memorySize : maxAddress), minAddress, minWriteMaxExecAddress); setInterruptCheckChain(prevInterruptCheckChain); if (maybeErr != 0) { @@ -535,8 +549,8 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) sqInt cpuAlien; sqInt maybeErr; char *memory; - unsigned long minAddress; - unsigned long minWriteMaxExecAddress; + usqIntptr_t minAddress; + usqIntptr_t minWriteMaxExecAddress; success(isWordsOrBytes(stackValue(2))); memory = ((char *) (firstIndexableField(stackValue(2)))); @@ -556,7 +570,7 @@ primitiveSingleStepInMemoryMinimumAddressReadWrite(void) primitiveFailFor(PrimErrBadReceiver); return null; } - maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(long)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); + maybeErr = singleStepCPUInSizeMinAddressReadWrite(cpu, memory, byteSizeOf(((sqInt)(sqIntptr_t)(memory) - BaseHeaderSize)), minAddress, minWriteMaxExecAddress); if (maybeErr != 0) { primitiveFailFor(PrimErrInappropriate); return null; @@ -598,6 +612,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) popRemappableOop = interpreterProxy->popRemappableOop; positive32BitIntegerFor = interpreterProxy->positive32BitIntegerFor; positive32BitValueOf = interpreterProxy->positive32BitValueOf; + positive64BitIntegerFor = interpreterProxy->positive64BitIntegerFor; positive64BitValueOf = interpreterProxy->positive64BitValueOf; primitiveFail = interpreterProxy->primitiveFail; primitiveFailFor = interpreterProxy->primitiveFailFor; diff --git a/src/plugins/HostWindowPlugin/HostWindowPlugin.c b/src/plugins/HostWindowPlugin/HostWindowPlugin.c index 5c87a82a3e..37b0514b82 100644 --- a/src/plugins/HostWindowPlugin/HostWindowPlugin.c +++ b/src/plugins/HostWindowPlugin/HostWindowPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - HostWindowPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + HostWindowPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "HostWindowPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "HostWindowPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -83,9 +83,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "HostWindowPlugin VMMaker.oscog-eem.1975 (i)" + "HostWindowPlugin VMMaker.oscog-nice.1982 (i)" #else - "HostWindowPlugin VMMaker.oscog-eem.1975 (e)" + "HostWindowPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -160,7 +160,7 @@ primitiveCreateHostWindow(void) if (failed()) { return null; } - listLength = slotSizeOf(((sqInt)(long)(list) - BaseHeaderSize)); + listLength = slotSizeOf(((sqInt)(sqIntptr_t)(list) - BaseHeaderSize)); windowIndex = createWindowWidthheightoriginXyattrlength(w, h, x, y, list, listLength); if (windowIndex > 0) { if (failed()) { @@ -352,7 +352,7 @@ primitiveHostWindowTitle(void) if (failed()) { return null; } - titleLength = slotSizeOf(((sqInt)(long)(titleString) - BaseHeaderSize)); + titleLength = slotSizeOf(((sqInt)(sqIntptr_t)(titleString) - BaseHeaderSize)); res = ioSetTitleOfWindow(id, titleString, titleLength); if (res == -1) { primitiveFail(); diff --git a/src/plugins/IA32ABI/IA32ABI.c b/src/plugins/IA32ABI/IA32ABI.c index e4a472eed9..df812e1d9d 100644 --- a/src/plugins/IA32ABI/IA32ABI.c +++ b/src/plugins/IA32ABI/IA32ABI.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - IA32ABIPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + IA32ABIPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "IA32ABIPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "IA32ABIPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -52,11 +52,11 @@ typedef struct { int type; int pad; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } crvrvs; } VMCallbackReturnValue; @@ -66,7 +66,7 @@ typedef struct { EXPORT(const char*) getModuleName(void); static sqInt indexlengthinRange(sqInt byteIndex, sqInt length, sqInt rcvr); EXPORT(sqInt) isAlien(sqInt anOop); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primAddressField(void); EXPORT(sqInt) primAddressFieldPut(void); EXPORT(sqInt) primAlienReplace(void); @@ -117,7 +117,7 @@ EXPORT(sqInt) primVarArgsCallOutDoubleReturn(void); EXPORT(sqInt) primVarArgsCallOutFloatReturn(void); EXPORT(sqInt) primVarArgsCallOutIntegralReturn(void); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); static sqInt sizeField(sqInt rcvr); static sqInt startOfByteData(sqInt rcvr); static sqInt startOfData(sqInt rcvr); @@ -187,7 +187,7 @@ static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*primitiveFailFor)(sqInt reasonCode); static sqInt (*pushFloat)(double f); static sqInt (*returnAsThroughCallbackContext)(sqInt returnTypeOop, VMCallbackContext *vmCallbackContext, sqInt callbackMethodContext); @@ -196,11 +196,11 @@ static sqInt (*signed32BitIntegerFor)(sqInt integerValue); static int (*signed32BitValueOf)(sqInt oop); static sqInt (*signed64BitIntegerFor)(sqLong integerValue); static sqLong (*signed64BitValueOf)(sqInt oop); -static long (*signedMachineIntegerValueOf)(sqInt oop); +static sqIntptr_t (*signedMachineIntegerValueOf)(sqInt oop); static sqInt (*stSizeOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackObjectValue)(sqInt offset); -static sqInt (*stackPositiveMachineIntegerValue)(sqInt offset); +static usqIntptr_t (*stackPositiveMachineIntegerValue)(sqInt offset); static sqInt (*stackValue)(sqInt offset); static sqInt (*trueObject)(void); #else /* !defined(SQUEAK_BUILTIN_PLUGIN) */ @@ -243,7 +243,7 @@ extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt primitiveFailFor(sqInt reasonCode); extern sqInt pushFloat(double f); extern sqInt returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbackContext, sqInt callbackMethodContext); @@ -252,11 +252,11 @@ extern sqInt signed32BitIntegerFor(sqInt integerValue); extern int signed32BitValueOf(sqInt oop); extern sqInt signed64BitIntegerFor(sqLong integerValue); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern sqInt stSizeOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackObjectValue(sqInt offset); -extern sqInt stackPositiveMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); extern sqInt stackValue(sqInt offset); extern sqInt trueObject(void); extern @@ -264,9 +264,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "IA32ABI VMMaker.oscog-eem.1975 (i)" + "IA32ABI VMMaker.oscog-nice.1982 (i)" #else - "IA32ABI VMMaker.oscog-eem.1975 (e)" + "IA32ABI VMMaker.oscog-nice.1982 (e)" #endif ; @@ -320,7 +320,7 @@ isAlien(sqInt anOop) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -499,9 +499,9 @@ EXPORT(sqInt) primAllocateExecutablePage(void) { sqInt alien; - long byteSize; + sqIntptr_t byteSize; void *mem; - long *ptr; + sqIntptr_t *ptr; mem = allocateExecutablePage(&byteSize); if (mem == 0) { @@ -513,7 +513,7 @@ primAllocateExecutablePage(void) } ptr = firstIndexableField(alien); ptr[0] = (0 - byteSize); - ptr[1] = (((long) mem)); + ptr[1] = (((sqIntptr_t) mem)); methodReturnValue(alien); return 0; } @@ -527,10 +527,10 @@ primAllocateExecutablePage(void) EXPORT(sqInt) primBoxedFree(void) { - sqInt addr; - sqInt *ptr; + sqIntptr_t addr; + sqIntptr_t *ptr; sqInt rcvr; - long sizeField; + sqIntptr_t sizeField; rcvr = stackValue(0); if (!((byteSizeOf(rcvr)) >= (2 * BytesPerOop))) { @@ -1673,9 +1673,9 @@ primStrlenThroughPointerAtIndex(void) EXPORT(sqInt) primThunkEntryAddress(void) { - sqInt address; + sqIntptr_t address; - address = ((sqInt)thunkEntry); + address = ((sqIntptr_t)thunkEntry); methodReturnValue((BytesPerWord == 8 ? positive64BitIntegerFor(address) : positive32BitIntegerFor(address))); @@ -2278,7 +2278,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/InternetConfigPlugin/InternetConfigPlugin.c b/src/plugins/InternetConfigPlugin/InternetConfigPlugin.c index 08a45d9d2c..62035ab215 100644 --- a/src/plugins/InternetConfigPlugin/InternetConfigPlugin.c +++ b/src/plugins/InternetConfigPlugin/InternetConfigPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - InternetConfigPlugin VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 + InternetConfigPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "InternetConfigPlugin VMMaker.oscog-eem.1699 uuid: 186ebd51-28ef-4e7f-8411-96b61577b777 " __DATE__ ; +static char __buildInfo[] = "InternetConfigPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -70,9 +70,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "InternetConfigPlugin VMMaker.oscog-eem.1699 (i)" + "InternetConfigPlugin VMMaker.oscog-nice.1982 (i)" #else - "InternetConfigPlugin VMMaker.oscog-eem.1699 (e)" + "InternetConfigPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -113,7 +113,7 @@ primitiveGetMacintoshFileTypeAndCreatorFrom(void) if (failed()) { return null; } - keyLength = byteSizeOf(((sqInt)(long)(aFileName) - BaseHeaderSize)); + keyLength = byteSizeOf(((sqInt)(sqIntptr_t)(aFileName) - BaseHeaderSize)); sqInternetGetMacintoshFileTypeAndCreatorFromkeySizeinto(aFileName, keyLength, creator); oop = instantiateClassindexableSize(classString(), 8); ptr = firstIndexableField(oop); @@ -144,7 +144,7 @@ primitiveGetStringKeyedBy(void) if (failed()) { return null; } - keyLength = byteSizeOf(((sqInt)(long)(aKey) - BaseHeaderSize)); + keyLength = byteSizeOf(((sqInt)(sqIntptr_t)(aKey) - BaseHeaderSize)); size = sqInternetConfigurationGetStringKeyedBykeySizeinto(aKey, keyLength, aString); oop = instantiateClassindexableSize(classString(), size); ptr = firstIndexableField(oop); diff --git a/src/plugins/LargeIntegers/LargeIntegers.c b/src/plugins/LargeIntegers/LargeIntegers.c index c2599e6321..b75d4e2897 100644 --- a/src/plugins/LargeIntegers/LargeIntegers.c +++ b/src/plugins/LargeIntegers/LargeIntegers.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - LargeIntegersPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + LargeIntegersPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "LargeIntegersPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "LargeIntegersPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; @@ -190,9 +190,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "LargeIntegers v2.0 VMMaker.oscog-eem.1975 (i)" + "LargeIntegers v2.0 VMMaker.oscog-nice.1989 (i)" #else - "LargeIntegers v2.0 VMMaker.oscog-eem.1975 (e)" + "LargeIntegers v2.0 VMMaker.oscog-nice.1989 (e)" #endif ; static const int orOpIndex = 1; @@ -520,7 +520,7 @@ cDigitDivlenremlenquolen(unsigned int *pDiv, sqInt divLen, unsigned int *pRem, s l += 1; } } - pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN(q)); + pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN((((unsigned int) q)))); } return 0; } @@ -1506,7 +1506,7 @@ digitDivLargewithnegative(sqInt firstInteger, sqInt secondInteger, sqInt neg) l += 1; } } - pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN(q)); + pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN((((unsigned int) q)))); } #if SPURVM @@ -1785,7 +1785,7 @@ digitSizeOfCSI(sqInt csi) { return ((MaxSmallInteger) <= 0x3FFFFFFF ? 1 - : (csi > (((long)0xFFFFFFFFU)) + : (csi > (((sqIntptr_t)0xFFFFFFFFU)) ? 2 : (csi < -4294967295LL ? 2 @@ -2186,11 +2186,11 @@ normalizeNegative(sqInt aLargeNegativeInteger) sqInt byteLen; unsigned int *cPointer; sqInt digitLen; - unsigned long minVal; + usqInt minVal; sqInt oldByteLen; int sLen; - unsigned long val; - unsigned long val2; + usqInt val; + usqInt val2; digitLen = ((slotSizeOf(aLargeNegativeInteger)) + 3) / 4; while ((digitLen != 0) @@ -2248,11 +2248,11 @@ normalizePositive(sqInt aLargePositiveInteger) sqInt byteLen; unsigned int *cPointer; sqInt digitLen; - unsigned long maxVal; + usqInt maxVal; sqInt oldByteLen; int sLen; - unsigned long val; - unsigned long val2; + usqInt val; + usqInt val2; digitLen = ((slotSizeOf(aLargePositiveInteger)) + 3) / 4; while ((digitLen != 0) @@ -2274,7 +2274,10 @@ normalizePositive(sqInt aLargePositiveInteger) maxVal = MaxSmallInteger; val2 = val; if (digitLen > 1) { - val2 = (val2 << 32) + (cDigitOfat(((unsigned int *) (firstIndexableField(aLargePositiveInteger))), 1 - 1)); + + /* Note: asUnsignedLongLong is not necessary because this branch is for 64 bits only. + but we want to avoid a C Compiler warning on 32 bits */ + val2 = ((((unsigned long long)val2)) << 32) + (cDigitOfat(((unsigned int *) (firstIndexableField(aLargePositiveInteger))), 1 - 1)); } if (val2 <= maxVal) { return integerObjectOf(val2); @@ -3090,7 +3093,7 @@ primDigitDivNegative(void) l += 1; } } - pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN(q)); + pQuo[quoLen - k] = (SQ_SWAP_4_BYTES_IF_BIGENDIAN((((unsigned int) q)))); } #if SPURVM diff --git a/src/plugins/MIDIPlugin/MIDIPlugin.c b/src/plugins/MIDIPlugin/MIDIPlugin.c index 6b284ea3a3..6bd5ae7e58 100644 --- a/src/plugins/MIDIPlugin/MIDIPlugin.c +++ b/src/plugins/MIDIPlugin/MIDIPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - MIDIPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + MIDIPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "MIDIPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "MIDIPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; @@ -87,9 +87,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "MIDIPlugin VMMaker.oscog-eem.1975 (i)" + "MIDIPlugin VMMaker.oscog-nice.1989 (i)" #else - "MIDIPlugin VMMaker.oscog-eem.1975 (e)" + "MIDIPlugin VMMaker.oscog-nice.1989 (e)" #endif ; @@ -330,8 +330,8 @@ primitiveMIDIRead(void) if (failed()) { return null; } - arrayLength = byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize)); - bytesRead = sqMIDIPortReadInto(portNum, arrayLength, ((sqInt)array)); + arrayLength = byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize)); + bytesRead = sqMIDIPortReadInto(portNum, arrayLength, array); if (failed()) { return null; } @@ -361,8 +361,8 @@ primitiveMIDIWrite(void) if (failed()) { return null; } - arrayLength = byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize)); - bytesWritten = sqMIDIPortWriteFromAt(portNum, arrayLength, ((sqInt)array), time); + arrayLength = byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize)); + bytesWritten = sqMIDIPortWriteFromAt(portNum, arrayLength, array, time); if (failed()) { return null; } diff --git a/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c b/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c index 69e6db5af0..a7fd3d4e2c 100644 --- a/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c +++ b/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - MacMenubarPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + MacMenubarPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "MacMenubarPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "MacMenubarPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -35,7 +35,7 @@ static char __buildInfo[] = "MacMenubarPlugin VMMaker.oscog-eem.1975 uuid: 76250 /*** Function Prototypes ***/ EXPORT(const char*) getModuleName(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveAppendMenu(void); EXPORT(sqInt) primitiveAppendMenuItemText(void); EXPORT(sqInt) primitiveCheckMenuItem(void); @@ -114,7 +114,7 @@ static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackValue)(sqInt offset); static sqInt (*success)(sqInt aBoolean); @@ -132,7 +132,7 @@ extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackValue(sqInt offset); extern sqInt success(sqInt aBoolean); @@ -142,9 +142,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "MacMenubarPlugin VMMaker.oscog-eem.1975 (i)" + "MacMenubarPlugin VMMaker.oscog-nice.1982 (i)" #else - "MacMenubarPlugin VMMaker.oscog-eem.1975 (e)" + "MacMenubarPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -164,7 +164,7 @@ getModuleName(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -337,8 +337,8 @@ primitiveCreateStandardWindowMenu(void) return null; } _return_value = (BytesPerWord == 8 - ? positive64BitIntegerFor(((long) menuHandle)) - : positive32BitIntegerFor(((long) menuHandle))); + ? positive64BitIntegerFor(((usqIntptr_t) menuHandle)) + : positive32BitIntegerFor(((usqIntptr_t) menuHandle))); if (failed()) { return null; } @@ -734,8 +734,8 @@ primitiveGetIndMenuWithCommandID(void) return null; } _return_value = (BytesPerWord == 8 - ? positive64BitIntegerFor(((long) applicationMenu)) - : positive32BitIntegerFor(((long) applicationMenu))); + ? positive64BitIntegerFor(((usqIntptr_t) applicationMenu)) + : positive32BitIntegerFor(((usqIntptr_t) applicationMenu))); if (failed()) { return null; } @@ -915,8 +915,8 @@ primitiveGetMenuBar(void) return null; } _return_value = (BytesPerWord == 8 - ? positive64BitIntegerFor(((long) menuHandle)) - : positive32BitIntegerFor(((long) menuHandle))); + ? positive64BitIntegerFor(((usqIntptr_t) menuHandle)) + : positive32BitIntegerFor(((usqIntptr_t) menuHandle))); if (failed()) { return null; } @@ -941,8 +941,8 @@ primitiveGetMenuHandle(void) return null; } _return_value = (BytesPerWord == 8 - ? positive64BitIntegerFor(((long) menuHandle)) - : positive32BitIntegerFor(((long) menuHandle))); + ? positive64BitIntegerFor(((usqIntptr_t) menuHandle)) + : positive32BitIntegerFor(((usqIntptr_t) menuHandle))); if (failed()) { return null; } @@ -1598,8 +1598,8 @@ primitiveNewMenu(void) return null; } _return_value = (BytesPerWord == 8 - ? positive64BitIntegerFor(((long) menuHandle)) - : positive32BitIntegerFor(((long) menuHandle))); + ? positive64BitIntegerFor(((usqIntptr_t) menuHandle)) + : positive32BitIntegerFor(((usqIntptr_t) menuHandle))); if (failed()) { return null; } diff --git a/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c b/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c index 2e59b32ef8..4778ebfab0 100644 --- a/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c +++ b/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - Mpeg3Plugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + Mpeg3Plugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "Mpeg3Plugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "Mpeg3Plugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -130,9 +130,9 @@ struct VirtualMachine* interpreterProxy; static sqInt maximumNumberOfFilesToWatch; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "Mpeg3Plugin VMMaker.oscog-eem.1975 (i)" + "Mpeg3Plugin VMMaker.oscog-nice.1982 (i)" #else - "Mpeg3Plugin VMMaker.oscog-eem.1975 (e)" + "Mpeg3Plugin VMMaker.oscog-nice.1982 (e)" #endif ; static mpeg3_t *mpegFiles[1024+1]; @@ -344,7 +344,7 @@ primitiveMPEG3CheckSig(void) if (failed()) { return null; } - sz = byteSizeOf(((sqInt)(long)(path) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(path) - BaseHeaderSize)); ioFilenamefromStringofLengthresolveAliases(storage, path, sz, 1); result = mpeg3_check_sig(storage); if (failed()) { @@ -847,7 +847,7 @@ primitiveMPEG3Open(void) if (failed()) { return null; } - sz = byteSizeOf(((sqInt)(long)(path) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(path) - BaseHeaderSize)); ioFilenamefromStringofLengthresolveAliases(storage, path, sz, 1); mpeg3Oop = instantiateClassindexableSize(classByteArray(), 4); index = ((mpeg3_t **) (firstIndexableField(mpeg3Oop))); diff --git a/src/plugins/QuicktimePlugin/QuicktimePlugin.c b/src/plugins/QuicktimePlugin/QuicktimePlugin.c index 14f07eb846..4876c0deed 100644 --- a/src/plugins/QuicktimePlugin/QuicktimePlugin.c +++ b/src/plugins/QuicktimePlugin/QuicktimePlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - QuicktimePlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + QuicktimePlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "QuicktimePlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "QuicktimePlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -54,7 +54,7 @@ static sqInt (*failed)(void); static sqInt (*integerObjectOf)(sqInt value); static sqInt (*pop)(sqInt nItems); static sqInt (*popthenPush)(sqInt nItems, sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackValue)(sqInt offset); #else /* !defined(SQUEAK_BUILTIN_PLUGIN) */ @@ -62,7 +62,7 @@ extern sqInt failed(void); extern sqInt integerObjectOf(sqInt value); extern sqInt pop(sqInt nItems); extern sqInt popthenPush(sqInt nItems, sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackValue(sqInt offset); extern @@ -70,9 +70,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "QuicktimePlugin VMMaker.oscog-eem.1975 (i)" + "QuicktimePlugin VMMaker.oscog-nice.1982 (i)" #else - "QuicktimePlugin VMMaker.oscog-eem.1975 (e)" + "QuicktimePlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -177,7 +177,7 @@ primitiveSetGWorldPtrOntoExistingSurface(void) char *buffer; sqInt depth; sqInt height; - long movie; + sqIntptr_t movie; sqInt moviePtr; sqInt rowBytes; sqInt surfaceID; @@ -194,7 +194,7 @@ primitiveSetGWorldPtrOntoExistingSurface(void) return null; } buffer = ((char *) (positiveMachineIntegerValueOf(bitMapPtr))); - movie = ((long) (positiveMachineIntegerValueOf(moviePtr))); + movie = ((sqIntptr_t) (positiveMachineIntegerValueOf(moviePtr))); stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie(surfaceID, buffer, width, height, rowBytes, depth, movie); if (failed()) { return null; @@ -211,7 +211,7 @@ primitiveSetGWorldPtrOntoSurface(void) char *buffer; sqInt depth; sqInt height; - long movie; + sqIntptr_t movie; sqInt moviePtr; sqInt results; sqInt rowBytes; @@ -228,7 +228,7 @@ primitiveSetGWorldPtrOntoSurface(void) return null; } buffer = ((char *) (positiveMachineIntegerValueOf(bitMapPtr))); - movie = ((long) (positiveMachineIntegerValueOf(moviePtr))); + movie = ((sqIntptr_t) (positiveMachineIntegerValueOf(moviePtr))); results = stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(buffer, width, height, rowBytes, depth, movie); if (failed()) { return null; diff --git a/src/plugins/SerialPlugin/SerialPlugin.c b/src/plugins/SerialPlugin/SerialPlugin.c index c4822de0d0..b022bd253d 100644 --- a/src/plugins/SerialPlugin/SerialPlugin.c +++ b/src/plugins/SerialPlugin/SerialPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - SerialPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SerialPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "SerialPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "SerialPlugin VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; @@ -85,9 +85,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "SerialPlugin VMMaker.oscog-eem.1975 (i)" + "SerialPlugin VMMaker.oscog-nice.1989 (i)" #else - "SerialPlugin VMMaker.oscog-eem.1975 (e)" + "SerialPlugin VMMaker.oscog-nice.1989 (e)" #endif ; @@ -232,7 +232,7 @@ primitiveSerialPortRead(void) return null; } success((startIndex >= 1) - && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); + && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize))))); arrayPtr = ((((sqInt)array)) + startIndex) - 1; bytesRead = serialPortReadInto( portNum, count, arrayPtr); if (failed()) { @@ -252,7 +252,7 @@ EXPORT(sqInt) primitiveSerialPortReadByName(void) { char *array; - sqInt arrayPtr; + char * arrayPtr; sqInt bytesRead; sqInt count; char *port; @@ -271,11 +271,11 @@ primitiveSerialPortReadByName(void) return null; } success((startIndex >= 1) - && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); + && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize))))); portNameSize = slotSizeOf(((sqInt)((portName) - BaseHeaderSize))); port = calloc(portNameSize+1, sizeof(char)); memcpy(port, portName, portNameSize); - arrayPtr = ((((sqInt)array)) + startIndex) - 1; + arrayPtr = (array + startIndex) - 1; bytesRead = serialPortReadIntoByName( port, count, arrayPtr); free(port); if (failed()) { @@ -295,7 +295,7 @@ EXPORT(sqInt) primitiveSerialPortWrite(void) { char *array; - sqInt arrayPtr; + char * arrayPtr; sqInt bytesWritten; sqInt count; sqInt portNum; @@ -312,9 +312,9 @@ primitiveSerialPortWrite(void) return null; } success((startIndex >= 1) - && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); + && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize))))); if (!(failed())) { - arrayPtr = ((((sqInt)array)) + startIndex) - 1; + arrayPtr = (array + startIndex) - 1; bytesWritten = serialPortWriteFrom(portNum, count, arrayPtr); } if (failed()) { @@ -334,7 +334,7 @@ EXPORT(sqInt) primitiveSerialPortWriteByName(void) { char *array; - sqInt arrayPtr; + char * arrayPtr; sqInt bytesWritten; sqInt count; char *port; @@ -357,9 +357,9 @@ primitiveSerialPortWriteByName(void) port = calloc(portNameSize+1, sizeof(char)); memcpy(port, portName, portNameSize); success((startIndex >= 1) - && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); + && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(sqIntptr_t)(array) - BaseHeaderSize))))); if (!(failed())) { - arrayPtr = ((((sqInt)array)) + startIndex) - 1; + arrayPtr = (array + startIndex) - 1; bytesWritten = serialPortWriteFromByName(port, count, arrayPtr); } free(port); diff --git a/src/plugins/SocketPlugin/SocketPlugin.c b/src/plugins/SocketPlugin/SocketPlugin.c index c4f56aaf08..39f8d35d95 100644 --- a/src/plugins/SocketPlugin/SocketPlugin.c +++ b/src/plugins/SocketPlugin/SocketPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - SocketPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SocketPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "SocketPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "SocketPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -169,9 +169,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "SocketPlugin VMMaker.oscog-eem.1975 (i)" + "SocketPlugin VMMaker.oscog-nice.1982 (i)" #else - "SocketPlugin VMMaker.oscog-eem.1975 (e)" + "SocketPlugin VMMaker.oscog-nice.1982 (e)" #endif ; static void * sCCLOPfn; @@ -255,7 +255,7 @@ netAddressToInt(unsigned char * ptrToByteArray) { sqInt sz; - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { return primitiveFail(); } @@ -385,8 +385,8 @@ primitiveResolverGetAddressInfo(void) return null; } if (!(failed())) { - hostSize = byteSizeOf(((sqInt)(long)(hostName) - BaseHeaderSize)); - servSize = byteSizeOf(((sqInt)(long)(servName) - BaseHeaderSize)); + hostSize = byteSizeOf(((sqInt)(sqIntptr_t)(hostName) - BaseHeaderSize)); + servSize = byteSizeOf(((sqInt)(sqIntptr_t)(servName) - BaseHeaderSize)); sqResolverGetAddressInfoHostSizeServiceSizeFlagsFamilyTypeProtocol(hostName, hostSize, servName, servSize, flags, family, type, protocol); } if (failed()) { @@ -481,7 +481,7 @@ primitiveResolverGetAddressInfoResult(void) return null; } if (!(failed())) { - addrSize = byteSizeOf(((sqInt)(long)(socketAddress) - BaseHeaderSize)); + addrSize = byteSizeOf(((sqInt)(sqIntptr_t)(socketAddress) - BaseHeaderSize)); sqResolverGetAddressInfoResultSize(socketAddress, addrSize); } if (failed()) { @@ -580,7 +580,7 @@ primitiveResolverGetNameInfoHostResult(void) return null; } if (!(failed())) { - addrSize = byteSizeOf(((sqInt)(long)(socketName) - BaseHeaderSize)); + addrSize = byteSizeOf(((sqInt)(sqIntptr_t)(socketName) - BaseHeaderSize)); sqResolverGetNameInfoHostResultSize(socketName, addrSize); } if (failed()) { @@ -628,7 +628,7 @@ primitiveResolverGetNameInfoServiceResult(void) return null; } if (!(failed())) { - addrSize = byteSizeOf(((sqInt)(long)(socketName) - BaseHeaderSize)); + addrSize = byteSizeOf(((sqInt)(sqIntptr_t)(socketName) - BaseHeaderSize)); sqResolverGetNameInfoServiceResultSize(socketName, addrSize); } if (failed()) { @@ -676,7 +676,7 @@ primitiveResolverHostNameResult(void) return null; } if (!(failed())) { - nameSize = byteSizeOf(((sqInt)(long)(nameString) - BaseHeaderSize)); + nameSize = byteSizeOf(((sqInt)(sqIntptr_t)(nameString) - BaseHeaderSize)); sqResolverHostNameResultSize(nameString, nameSize); } if (failed()) { @@ -767,7 +767,7 @@ primitiveResolverStartAddressLookup(void) } /* begin netAddressToInt: */ ptrToByteArray = ((unsigned char *) (((unsigned char *) address))); - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { addr = primitiveFail(); goto l1; @@ -797,7 +797,7 @@ primitiveResolverStartNameLookup(void) return null; } if (!(failed())) { - sz = byteSizeOf(((sqInt)(long)(name) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(name) - BaseHeaderSize)); sqResolverStartNameLookup(name, sz); } if (failed()) { @@ -1059,7 +1059,7 @@ primitiveSocketBindToPort(void) } /* begin netAddressToInt: */ ptrToByteArray = ((unsigned char *) (((unsigned char *) address))); - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { addr = primitiveFail(); goto l1; @@ -1198,7 +1198,7 @@ primitiveSocketConnectToPort(void) } /* begin netAddressToInt: */ ptrToByteArray = ((unsigned char *) (((unsigned char *) address))); - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { addr = primitiveFail(); goto l1; @@ -1601,7 +1601,7 @@ primitiveSocketListenOnPortBacklogInterface(void) } /* begin netAddressToInt: */ ptrToByteArray = ((unsigned char *) (((unsigned char *) ifAddr))); - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { addr = primitiveFail(); goto l1; @@ -2224,7 +2224,7 @@ primitiveSocketSendUDPDataBufCount(void) bufStart = arrayBase + ((startIndex - 1) * byteSize); /* begin netAddressToInt: */ ptrToByteArray = ((unsigned char *) (((unsigned char *) hostAddress))); - sz = byteSizeOf(((sqInt)(long)(ptrToByteArray) - BaseHeaderSize)); + sz = byteSizeOf(((sqInt)(sqIntptr_t)(ptrToByteArray) - BaseHeaderSize)); if (!(sz == 4)) { address = primitiveFail(); goto l1; diff --git a/src/plugins/SoundPlugin/SoundPlugin.c b/src/plugins/SoundPlugin/SoundPlugin.c index 28de03f1bf..3f5fd560bc 100644 --- a/src/plugins/SoundPlugin/SoundPlugin.c +++ b/src/plugins/SoundPlugin/SoundPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - SoundPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + SoundPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "SoundPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "SoundPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -100,9 +100,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "SoundPlugin VMMaker.oscog-eem.1975 (i)" + "SoundPlugin VMMaker.oscog-nice.1982 (i)" #else - "SoundPlugin VMMaker.oscog-eem.1975 (e)" + "SoundPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -236,7 +236,7 @@ primitiveSoundInsertSamples(void) if (failed()) { return null; } - success(frameCount <= (slotSizeOf(((sqInt)(long)(buf) - BaseHeaderSize)))); + success(frameCount <= (slotSizeOf(((sqInt)(sqIntptr_t)(buf) - BaseHeaderSize)))); if (!(failed())) { framesPlayed = snd_InsertSamplesFromLeadTime(frameCount, (void *)buf, leadTime); success(framesPlayed >= 0); @@ -274,7 +274,7 @@ primitiveSoundPlaySamples(void) return null; } success((startIndex >= 1) - && (((startIndex + frameCount) - 1) <= (slotSizeOf(((sqInt)(long)(buf) - BaseHeaderSize))))); + && (((startIndex + frameCount) - 1) <= (slotSizeOf(((sqInt)(sqIntptr_t)(buf) - BaseHeaderSize))))); if (!(failed())) { framesPlayed = snd_PlaySamplesFromAtLength(frameCount, (void *)buf, startIndex - 1); success(framesPlayed >= 0); @@ -342,7 +342,7 @@ primitiveSoundRecordSamples(void) return null; } if (!(failed())) { - bufSizeInBytes = (slotSizeOf(((sqInt)(long)(buf) - BaseHeaderSize))) * 4; + bufSizeInBytes = (slotSizeOf(((sqInt)(sqIntptr_t)(buf) - BaseHeaderSize))) * 4; success((startWordIndex >= 1) && (((startWordIndex - 1) * 2) < bufSizeInBytes)); } diff --git a/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c b/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c index 15d08fb065..05913934ed 100644 --- a/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c +++ b/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + VMPluginCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - ThreadedARMFFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + ThreadedARMFFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe " __DATE__ ; +static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; @@ -44,6 +44,9 @@ static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.1977 uuid: e #if defined(__GNUC__) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) # define setsp(sp) asm volatile ("movl %0,%%esp" : : "m"(sp)) # define getsp() ({ void *esp; asm volatile ("movl %%esp,%0" : "=r"(esp) : ); esp;}) +# elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64)) +# define setsp(sp) asm volatile ("movq %0,%%rsp" : : "m"(sp)) +# define getsp() ({ void *rsp; asm volatile ("movq %%rsp,%0" : "=r"(rsp) : ); rsp;}) # elif defined(__GNUC__) && (defined(__arm__)) # define setsp(sp) asm volatile ("ldr %%sp, %0" : : "m"(sp)) # define getsp() ({ void *sp; asm volatile ("mov %0, %%sp" : "=r"(sp) : ); sp;}) @@ -91,10 +94,14 @@ static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.1977 uuid: e # if WIN32 # define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 # endif +# elif defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64) +# if WIN32 | WIN64 +# define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 +# endif #endif /* defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__) */ #if !defined(ALLOCA_LIES_SO_USE_GETSP) -# if defined(__MINGW32__) && (__GNUC__ >= 3) +# if defined(__MINGW32__) && (__GNUC__ >= 3) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) /* * cygwin -mno-cygwin (MinGW) gcc 3.4.x's alloca is a library routine that answers * %esp + 4, so the outgoing stack is offset by one word if uncorrected. @@ -187,7 +194,7 @@ warning(char *s) { /* Print an error message but don't exit. */ #define PrimErrNotFound 11 #define PrimErrObjectMayMove 14 #if !defined(SPURVM) /* Allow this to be overridden on the compiler command line */ -# define SPURVM 0 +# define SPURVM 1 #endif typedef struct { @@ -269,7 +276,7 @@ static sqInt isAtomicType(sqInt typeSpec); static sqInt isDirectAlien(sqInt oop); static sqInt msg(char *s); static sqInt nonRegisterStructReturnIsViaImplicitFirstArgument(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveCallout(void); EXPORT(void) primitiveCalloutWithArgs(void); EXPORT(sqInt) primitiveCreateManualSurface(void); @@ -290,7 +297,7 @@ EXPORT(sqInt) primitiveSetManualSurfacePointer(void); static sqInt registerArgsSlop(void); static sqInt returnStructInRegisters(sqInt returnStructSize); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); static sqInt sizeField(sqInt oop); static sqInt startOfData(sqInt oop); @@ -378,11 +385,11 @@ static sqInt (*ownVM)(sqInt flags); static sqInt (*pop)(sqInt nItems); static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*popRemappableOop)(void); -static usqInt (*positive32BitIntegerFor)(unsigned int integerValue); +static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*primitiveErrorTable)(void); static sqInt (*primitiveFail)(void); static sqInt (*primitiveFailFor)(sqInt reasonCode); @@ -393,7 +400,7 @@ static sqInt (*pushRemappableOop)(sqInt oop); static sqInt (*signed32BitIntegerFor)(sqInt integerValue); static sqInt (*signed64BitIntegerFor)(sqLong integerValue); static sqLong (*signed64BitValueOf)(sqInt oop); -static long (*signedMachineIntegerValueOf)(sqInt oop); +static sqIntptr_t (*signedMachineIntegerValueOf)(sqInt oop); static sqInt (*slotSizeOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackObjectValue)(sqInt offset); @@ -473,11 +480,11 @@ extern sqInt ownVM(sqInt flags); extern sqInt pop(sqInt nItems); extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt popRemappableOop(void); -extern usqInt positive32BitIntegerFor(unsigned int integerValue); +extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt primitiveErrorTable(void); extern sqInt primitiveFail(void); extern sqInt primitiveFailFor(sqInt reasonCode); @@ -488,7 +495,7 @@ extern sqInt pushRemappableOop(sqInt oop); extern sqInt signed32BitIntegerFor(sqInt integerValue); extern sqInt signed64BitIntegerFor(sqLong integerValue); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern sqInt slotSizeOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackObjectValue(sqInt offset); @@ -502,9 +509,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "ARM32FFIPlugin VMMaker.oscog-eem.1977 (i)" + "ARM32FFIPlugin VMMaker.oscog-nice.1990 (i)" #else - "ARM32FFIPlugin VMMaker.oscog-eem.1977 (e)" + "ARM32FFIPlugin VMMaker.oscog-nice.1990 (e)" #endif ; @@ -587,7 +594,7 @@ ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize) if (!(((byteOffset + byteSize) - 1) <= rcvrSize)) { return primitiveFail(); } - addr = ((long) (firstIndexableField(rcvr))); + addr = ((sqIntptr_t) (firstIndexableField(rcvr))); } addr = (addr + byteOffset) - 1; return addr; @@ -798,13 +805,13 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c sqInt atomicType; sqInt atomicType1; sqInt atomicType2; - int availableRegisterSpace; - int availableRegisterSpace1; + sqInt availableRegisterSpace; + sqInt availableRegisterSpace1; char *copy; sqInt err; double floatValue; sqInt intValue; - int isAlien; + sqInt isAlien; sqInt isString; sqInt isStruct; sqInt length; @@ -1478,7 +1485,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS { sqInt atomicType; char *copy; - int isAlien; + sqInt isAlien; sqInt isString; sqInt length; char *pointer; @@ -1774,7 +1781,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; sqInt strLen; @@ -1805,16 +1812,16 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -1975,7 +1982,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop = (value == 0 ? falseObject() : trueObject()); @@ -1995,11 +2002,11 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop = integerObjectOf(value); @@ -2066,7 +2073,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt oop2; sqInt oop3; void *pointer; - long *ptr; + sqIntptr_t *ptr; sqInt *ptr1; sqInt requiredStackSize; sqInt result; @@ -2075,10 +2082,10 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; - int stackSize; + sqInt stackSize; sqInt strLen; sqInt strOop; char *strPtr; @@ -2282,16 +2289,16 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -2453,7 +2460,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -2473,11 +2480,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -2559,7 +2566,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo { sqInt byteSize; usqLong mask; - int shift; + sqInt shift; usqLong value; assert(atomicType < FFITypeSingleFloat); @@ -2569,7 +2576,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal)) ? retVal - : retVal & ((1U << (byteSize * 8)) - 1)); + : retVal & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); return (value == 0 ? falseObject() : trueObject()); @@ -2588,11 +2595,11 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal & (((((unsigned long)1)) << shift) - 1); + value = retVal & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } return integerObjectOf(value); @@ -2762,7 +2769,7 @@ ffiLoadCalloutAddress(sqInt lit) { sqInt address; sqInt addressPtr; - long *ptr; + sqIntptr_t *ptr; /* Lookup the address */ @@ -3246,8 +3253,8 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) sqInt *argSpec1; sqInt argSpecSize; sqInt argSpecSize1; - int availableRegisterSpace; - int availableRegisterSpace1; + sqInt availableRegisterSpace; + sqInt availableRegisterSpace1; void * ptrAddress; sqInt ptrClass; sqInt roundedSize; @@ -3392,7 +3399,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) static sqInt ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt *argSpec, sqInt argSpecSize, CalloutState *calloutState) { - int availableRegisterSpace; + sqInt availableRegisterSpace; sqInt roundedSize; sqInt stackPartSize; @@ -3904,7 +3911,7 @@ nonRegisterStructReturnIsViaImplicitFirstArgument(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -3990,8 +3997,8 @@ primitiveCallout(void) sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; + sqIntptr_t *ptr; + sqIntptr_t *ptr1; sqInt *ptr2; sqInt *ptr3; sqInt requiredStackSize; @@ -4010,14 +4017,14 @@ primitiveCallout(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -4254,16 +4261,16 @@ primitiveCallout(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -4425,7 +4432,7 @@ primitiveCallout(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -4445,11 +4452,11 @@ primitiveCallout(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -4689,16 +4696,16 @@ primitiveCallout(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + intRet1 = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -4860,7 +4867,7 @@ primitiveCallout(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); oop4 = (value1 == 0 ? falseObject() : trueObject()); @@ -4880,11 +4887,11 @@ primitiveCallout(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } oop4 = integerObjectOf(value1); @@ -4994,8 +5001,8 @@ primitiveCalloutWithArgs(void) sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; + sqIntptr_t *ptr; + sqIntptr_t *ptr1; sqInt *ptr2; sqInt *ptr3; sqInt requiredStackSize; @@ -5014,14 +5021,14 @@ primitiveCalloutWithArgs(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -5262,16 +5269,16 @@ primitiveCalloutWithArgs(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -5433,7 +5440,7 @@ primitiveCalloutWithArgs(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -5453,11 +5460,11 @@ primitiveCalloutWithArgs(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -5703,16 +5710,16 @@ primitiveCalloutWithArgs(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + intRet1 = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -5874,7 +5881,7 @@ primitiveCalloutWithArgs(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); oop4 = (value1 == 0 ? falseObject() : trueObject()); @@ -5894,11 +5901,11 @@ primitiveCalloutWithArgs(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } oop4 = integerObjectOf(value1); @@ -5968,9 +5975,7 @@ primitiveCreateManualSurface(void) if (result < 0) { return primitiveFail(); } - result = (BytesPerWord == 8 - ? signed64BitIntegerFor(result) - : signed32BitIntegerFor(result)); + result = signed32BitIntegerFor(result); return popthenPush(6, result); } @@ -6009,7 +6014,7 @@ primitiveFFIAllocate(void) sqInt addr; sqInt byteSize; sqInt oop; - long *ptr; + sqIntptr_t *ptr; byteSize = stackIntegerValue(0); if (failed()) { @@ -6019,7 +6024,7 @@ primitiveFFIAllocate(void) if (addr == 0) { return primitiveFail(); } - oop = instantiateClassindexableSize(classExternalAddress(), sizeof(long)); + oop = instantiateClassindexableSize(classExternalAddress(), sizeof(sqIntptr_t)); ptr = firstIndexableField(oop); ptr[0] = addr; return popthenPush(2, oop); @@ -6150,13 +6155,13 @@ primitiveFFIFloatAtPut(void) EXPORT(sqInt) primitiveFFIFree(void) { - long addr; + sqIntptr_t addr; sqInt oop; - long *ptr; + sqIntptr_t *ptr; oop = stackObjectValue(0); if (!(((fetchClassOf(oop)) == (classExternalAddress())) - && ((byteSizeOf(oop)) == (sizeof(long))))) { + && ((byteSizeOf(oop)) == (sizeof(sqIntptr_t))))) { return primitiveFail(); } ptr = firstIndexableField(oop); @@ -6164,7 +6169,7 @@ primitiveFFIFree(void) /* Don't you dare to free Squeak's memory! */ addr = ptr[0]; if ((addr == 0) - || ((((((unsigned long)addr)) & ((sizeof(long)) - 1)) != 0) + || ((((((usqIntptr_t)addr)) & ((sizeof(sqIntptr_t)) - 1)) != 0) || (isInMemory(addr)))) { return primitiveFail(); } @@ -6240,7 +6245,7 @@ primitiveFFIIntegerAt(void) if (isSigned) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = integerObjectOf(value); @@ -6252,7 +6257,7 @@ primitiveFFIIntegerAt(void) if (byteSize < 8) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = signed64BitIntegerFor(value); @@ -6476,7 +6481,7 @@ primitiveLogCallsTo(void) EXPORT(sqInt) primitiveSetManualSurfacePointer(void) { - unsigned long ptr; + usqIntptr_t ptr; sqInt result; sqInt surfaceID; @@ -6639,7 +6644,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c b/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c index 64a12cfdc1..a88db29cab 100644 --- a/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c +++ b/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + VMPluginCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - ThreadedIA32FFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + ThreadedIA32FFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe " __DATE__ ; +static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; @@ -44,6 +44,9 @@ static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-eem.1977 uuid: #if defined(__GNUC__) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) # define setsp(sp) asm volatile ("movl %0,%%esp" : : "m"(sp)) # define getsp() ({ void *esp; asm volatile ("movl %%esp,%0" : "=r"(esp) : ); esp;}) +# elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64)) +# define setsp(sp) asm volatile ("movq %0,%%rsp" : : "m"(sp)) +# define getsp() ({ void *rsp; asm volatile ("movq %%rsp,%0" : "=r"(rsp) : ); rsp;}) # elif defined(__GNUC__) && (defined(__arm__)) # define setsp(sp) asm volatile ("ldr %%sp, %0" : : "m"(sp)) # define getsp() ({ void *sp; asm volatile ("mov %0, %%sp" : "=r"(sp) : ); sp;}) @@ -91,10 +94,14 @@ static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-eem.1977 uuid: # if WIN32 # define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 # endif +# elif defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64) +# if WIN32 | WIN64 +# define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 +# endif #endif /* defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__) */ #if !defined(ALLOCA_LIES_SO_USE_GETSP) -# if defined(__MINGW32__) && (__GNUC__ >= 3) +# if defined(__MINGW32__) && (__GNUC__ >= 3) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) /* * cygwin -mno-cygwin (MinGW) gcc 3.4.x's alloca is a library routine that answers * %esp + 4, so the outgoing stack is offset by one word if uncorrected. @@ -185,7 +192,7 @@ warning(char *s) { /* Print an error message but don't exit. */ #define PrimErrNotFound 11 #define PrimErrObjectMayMove 14 #if !defined(SPURVM) /* Allow this to be overridden on the compiler command line */ -# define SPURVM 0 +# define SPURVM 1 #endif typedef struct { @@ -261,7 +268,7 @@ static sqInt isAtomicType(sqInt typeSpec); static sqInt isDirectAlien(sqInt oop); static sqInt msg(char *s); static sqInt nonRegisterStructReturnIsViaImplicitFirstArgument(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveCallout(void); EXPORT(void) primitiveCalloutWithArgs(void); EXPORT(sqInt) primitiveCreateManualSurface(void); @@ -281,7 +288,7 @@ EXPORT(sqInt) primitiveLogCallsTo(void); EXPORT(sqInt) primitiveSetManualSurfacePointer(void); static sqInt registerArgsSlop(void); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); static sqInt sizeField(sqInt oop); static sqInt startOfData(sqInt oop); @@ -369,11 +376,11 @@ static sqInt (*ownVM)(sqInt flags); static sqInt (*pop)(sqInt nItems); static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*popRemappableOop)(void); -static usqInt (*positive32BitIntegerFor)(unsigned int integerValue); +static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*primitiveErrorTable)(void); static sqInt (*primitiveFail)(void); static sqInt (*primitiveFailFor)(sqInt reasonCode); @@ -384,7 +391,7 @@ static sqInt (*pushRemappableOop)(sqInt oop); static sqInt (*signed32BitIntegerFor)(sqInt integerValue); static sqInt (*signed64BitIntegerFor)(sqLong integerValue); static sqLong (*signed64BitValueOf)(sqInt oop); -static long (*signedMachineIntegerValueOf)(sqInt oop); +static sqIntptr_t (*signedMachineIntegerValueOf)(sqInt oop); static sqInt (*slotSizeOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackObjectValue)(sqInt offset); @@ -464,11 +471,11 @@ extern sqInt ownVM(sqInt flags); extern sqInt pop(sqInt nItems); extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt popRemappableOop(void); -extern usqInt positive32BitIntegerFor(unsigned int integerValue); +extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt primitiveErrorTable(void); extern sqInt primitiveFail(void); extern sqInt primitiveFailFor(sqInt reasonCode); @@ -479,7 +486,7 @@ extern sqInt pushRemappableOop(sqInt oop); extern sqInt signed32BitIntegerFor(sqInt integerValue); extern sqInt signed64BitIntegerFor(sqLong integerValue); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern sqInt slotSizeOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackObjectValue(sqInt offset); @@ -493,9 +500,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "IA32FFIPlugin VMMaker.oscog-eem.1977 (i)" + "IA32FFIPlugin VMMaker.oscog-nice.1990 (i)" #else - "IA32FFIPlugin VMMaker.oscog-eem.1977 (e)" + "IA32FFIPlugin VMMaker.oscog-nice.1990 (e)" #endif ; @@ -579,7 +586,7 @@ ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize) if (!(((byteOffset + byteSize) - 1) <= rcvrSize)) { return primitiveFail(); } - addr = ((long) (firstIndexableField(rcvr))); + addr = ((sqIntptr_t) (firstIndexableField(rcvr))); } addr = (addr + byteOffset) - 1; return addr; @@ -771,7 +778,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c sqInt err; double floatValue; sqInt intValue; - int isAlien; + sqInt isAlien; sqInt isString; sqInt isStruct; sqInt length; @@ -1314,7 +1321,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS { sqInt atomicType; char *copy; - int isAlien; + sqInt isAlien; sqInt isString; sqInt length; char *pointer; @@ -1568,7 +1575,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; sqInt strLen; @@ -1762,7 +1769,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop = (value == 0 ? falseObject() : trueObject()); @@ -1782,11 +1789,11 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop = integerObjectOf(value); @@ -1853,7 +1860,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt oop2; sqInt oop3; void *pointer; - long *ptr; + sqIntptr_t *ptr; sqInt *ptr1; sqInt requiredStackSize; sqInt result; @@ -1862,10 +1869,10 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; - int stackSize; + sqInt stackSize; sqInt strLen; sqInt strOop; char *strPtr; @@ -2227,7 +2234,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -2247,11 +2254,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -2333,7 +2340,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo { sqInt byteSize; usqLong mask; - int shift; + sqInt shift; usqLong value; assert(atomicType < FFITypeSingleFloat); @@ -2343,7 +2350,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal)) ? retVal - : retVal & ((1U << (byteSize * 8)) - 1)); + : retVal & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); return (value == 0 ? falseObject() : trueObject()); @@ -2362,11 +2369,11 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal & (((((unsigned long)1)) << shift) - 1); + value = retVal & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } return integerObjectOf(value); @@ -2536,7 +2543,7 @@ ffiLoadCalloutAddress(sqInt lit) { sqInt address; sqInt addressPtr; - long *ptr; + sqIntptr_t *ptr; /* Lookup the address */ @@ -3454,7 +3461,7 @@ nonRegisterStructReturnIsViaImplicitFirstArgument(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -3540,8 +3547,8 @@ primitiveCallout(void) sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; + sqIntptr_t *ptr; + sqIntptr_t *ptr1; sqInt *ptr2; sqInt *ptr3; sqInt requiredStackSize; @@ -3560,14 +3567,14 @@ primitiveCallout(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -3962,7 +3969,7 @@ primitiveCallout(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -3982,11 +3989,11 @@ primitiveCallout(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -4384,7 +4391,7 @@ primitiveCallout(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); oop4 = (value1 == 0 ? falseObject() : trueObject()); @@ -4404,11 +4411,11 @@ primitiveCallout(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } oop4 = integerObjectOf(value1); @@ -4518,8 +4525,8 @@ primitiveCalloutWithArgs(void) sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; + sqIntptr_t *ptr; + sqIntptr_t *ptr1; sqInt *ptr2; sqInt *ptr3; sqInt requiredStackSize; @@ -4538,14 +4545,14 @@ primitiveCalloutWithArgs(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -4944,7 +4951,7 @@ primitiveCalloutWithArgs(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -4964,11 +4971,11 @@ primitiveCalloutWithArgs(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -5372,7 +5379,7 @@ primitiveCalloutWithArgs(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); oop4 = (value1 == 0 ? falseObject() : trueObject()); @@ -5392,11 +5399,11 @@ primitiveCalloutWithArgs(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } oop4 = integerObjectOf(value1); @@ -5466,9 +5473,7 @@ primitiveCreateManualSurface(void) if (result < 0) { return primitiveFail(); } - result = (BytesPerWord == 8 - ? signed64BitIntegerFor(result) - : signed32BitIntegerFor(result)); + result = signed32BitIntegerFor(result); return popthenPush(6, result); } @@ -5507,7 +5512,7 @@ primitiveFFIAllocate(void) sqInt addr; sqInt byteSize; sqInt oop; - long *ptr; + sqIntptr_t *ptr; byteSize = stackIntegerValue(0); if (failed()) { @@ -5517,7 +5522,7 @@ primitiveFFIAllocate(void) if (addr == 0) { return primitiveFail(); } - oop = instantiateClassindexableSize(classExternalAddress(), sizeof(long)); + oop = instantiateClassindexableSize(classExternalAddress(), sizeof(sqIntptr_t)); ptr = firstIndexableField(oop); ptr[0] = addr; return popthenPush(2, oop); @@ -5648,13 +5653,13 @@ primitiveFFIFloatAtPut(void) EXPORT(sqInt) primitiveFFIFree(void) { - long addr; + sqIntptr_t addr; sqInt oop; - long *ptr; + sqIntptr_t *ptr; oop = stackObjectValue(0); if (!(((fetchClassOf(oop)) == (classExternalAddress())) - && ((byteSizeOf(oop)) == (sizeof(long))))) { + && ((byteSizeOf(oop)) == (sizeof(sqIntptr_t))))) { return primitiveFail(); } ptr = firstIndexableField(oop); @@ -5662,7 +5667,7 @@ primitiveFFIFree(void) /* Don't you dare to free Squeak's memory! */ addr = ptr[0]; if ((addr == 0) - || ((((((unsigned long)addr)) & ((sizeof(long)) - 1)) != 0) + || ((((((usqIntptr_t)addr)) & ((sizeof(sqIntptr_t)) - 1)) != 0) || (isInMemory(addr)))) { return primitiveFail(); } @@ -5738,7 +5743,7 @@ primitiveFFIIntegerAt(void) if (isSigned) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = integerObjectOf(value); @@ -5750,7 +5755,7 @@ primitiveFFIIntegerAt(void) if (byteSize < 8) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = signed64BitIntegerFor(value); @@ -5974,7 +5979,7 @@ primitiveLogCallsTo(void) EXPORT(sqInt) primitiveSetManualSurfacePointer(void) { - unsigned long ptr; + usqIntptr_t ptr; sqInt result; sqInt surfaceID; @@ -6126,7 +6131,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c b/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c index 85c56a1bd0..1d2b252e10 100644 --- a/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c +++ b/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c @@ -1,5 +1,5 @@ /* Automatically generated by - ThreadedFFIPlugin VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194 + ThreadedFFIPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #if defined(__ARM_ARCH__) || defined(__arm__) || defined(__arm32__) || defined(ARM32) @@ -17,7 +17,7 @@ # define X64SysVFFIPlugin_exports SqueakFFIPrims_exports # include "X64SysVFFIPlugin.c" -#elif defined(WIN64) && (!defined(WIN64) && (defined(x86_64) || defined(__amd64) || defined(__x86_64) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64))) +#elif defined(WIN64) && (defined(x86_64) || defined(__amd64) || defined(__x86_64) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) # define X64Win64FFIPlugin_exports SqueakFFIPrims_exports # include "X64Win64FFIPlugin.c" diff --git a/src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c b/src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c index b464fefdd3..413d19a818 100644 --- a/src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c +++ b/src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + VMPluginCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - ThreadedX64SysVFFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + ThreadedX64SysVFFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "ThreadedX64SysVFFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe " __DATE__ ; +static char __buildInfo[] = "ThreadedX64SysVFFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; @@ -44,6 +44,9 @@ static char __buildInfo[] = "ThreadedX64SysVFFIPlugin VMMaker.oscog-eem.1977 uui #if defined(__GNUC__) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) # define setsp(sp) asm volatile ("movl %0,%%esp" : : "m"(sp)) # define getsp() ({ void *esp; asm volatile ("movl %%esp,%0" : "=r"(esp) : ); esp;}) +# elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64)) +# define setsp(sp) asm volatile ("movq %0,%%rsp" : : "m"(sp)) +# define getsp() ({ void *rsp; asm volatile ("movq %%rsp,%0" : "=r"(rsp) : ); rsp;}) # elif defined(__GNUC__) && (defined(__arm__)) # define setsp(sp) asm volatile ("ldr %%sp, %0" : : "m"(sp)) # define getsp() ({ void *sp; asm volatile ("mov %0, %%sp" : "=r"(sp) : ); sp;}) @@ -91,10 +94,14 @@ static char __buildInfo[] = "ThreadedX64SysVFFIPlugin VMMaker.oscog-eem.1977 uui # if WIN32 # define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 # endif +# elif defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64) +# if WIN32 | WIN64 +# define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 +# endif #endif /* defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__) */ #if !defined(ALLOCA_LIES_SO_USE_GETSP) -# if defined(__MINGW32__) && (__GNUC__ >= 3) +# if defined(__MINGW32__) && (__GNUC__ >= 3) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) /* * cygwin -mno-cygwin (MinGW) gcc 3.4.x's alloca is a library routine that answers * %esp + 4, so the outgoing stack is offset by one word if uncorrected. @@ -187,7 +194,7 @@ warning(char *s) { /* Print an error message but don't exit. */ #define PrimErrNotFound 11 #define PrimErrObjectMayMove 14 #if !defined(SPURVM) /* Allow this to be overridden on the compiler command line */ -# define SPURVM 0 +# define SPURVM 1 #endif #define WordSize 8 @@ -271,13 +278,15 @@ static sqInt ffiReturnType(sqInt specOnStack); static sqInt ffiSupportsCallingConvention(sqInt aCallingConvention); static sqInt ffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType); EXPORT(const char *) getModuleName(void); +static sqInt incrementFloatRegisterIndex(CalloutState * self_in_incrementFloatRegisterIndex); +static sqInt incrementIntegerRegisterIndex(CalloutState * self_in_incrementIntegerRegisterIndex); EXPORT(sqInt) initialiseModule(void); static sqInt isAlien(sqInt anOop); static sqInt isAtomicType(sqInt typeSpec); static sqInt isDirectAlien(sqInt oop); static sqInt msg(char *s); static sqInt nonRegisterStructReturnIsViaImplicitFirstArgument(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveCallout(void); EXPORT(void) primitiveCalloutWithArgs(void); EXPORT(sqInt) primitiveCreateManualSurface(void); @@ -298,7 +307,7 @@ EXPORT(sqInt) primitiveSetManualSurfacePointer(void); static sqInt registerArgsSlop(void); static sqInt returnStructInRegisters(sqInt returnStructSize); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); static sqInt sizeField(sqInt oop); static sqInt startOfData(sqInt oop); @@ -386,11 +395,11 @@ static sqInt (*ownVM)(sqInt flags); static sqInt (*pop)(sqInt nItems); static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*popRemappableOop)(void); -static usqInt (*positive32BitIntegerFor)(unsigned int integerValue); +static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*primitiveErrorTable)(void); static sqInt (*primitiveFail)(void); static sqInt (*primitiveFailFor)(sqInt reasonCode); @@ -401,7 +410,7 @@ static sqInt (*pushRemappableOop)(sqInt oop); static sqInt (*signed32BitIntegerFor)(sqInt integerValue); static sqInt (*signed64BitIntegerFor)(sqLong integerValue); static sqLong (*signed64BitValueOf)(sqInt oop); -static long (*signedMachineIntegerValueOf)(sqInt oop); +static sqIntptr_t (*signedMachineIntegerValueOf)(sqInt oop); static sqInt (*slotSizeOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackObjectValue)(sqInt offset); @@ -481,11 +490,11 @@ extern sqInt ownVM(sqInt flags); extern sqInt pop(sqInt nItems); extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt popRemappableOop(void); -extern usqInt positive32BitIntegerFor(unsigned int integerValue); +extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt primitiveErrorTable(void); extern sqInt primitiveFail(void); extern sqInt primitiveFailFor(sqInt reasonCode); @@ -496,7 +505,7 @@ extern sqInt pushRemappableOop(sqInt oop); extern sqInt signed32BitIntegerFor(sqInt integerValue); extern sqInt signed64BitIntegerFor(sqLong integerValue); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern sqInt slotSizeOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackObjectValue(sqInt offset); @@ -510,9 +519,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "X64SysVFFIPlugin VMMaker.oscog-eem.1977 (i)" + "X64SysVFFIPlugin VMMaker.oscog-nice.1990 (i)" #else - "X64SysVFFIPlugin VMMaker.oscog-eem.1977 (e)" + "X64SysVFFIPlugin VMMaker.oscog-nice.1990 (e)" #endif ; @@ -595,7 +604,7 @@ ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize) if (!(((byteOffset + byteSize) - 1) <= rcvrSize)) { return primitiveFail(); } - addr = ((long) (firstIndexableField(rcvr))); + addr = ((sqIntptr_t) (firstIndexableField(rcvr))); } addr = (addr + byteOffset) - 1; return addr; @@ -751,7 +760,7 @@ ffiArgByValuein(sqInt oop, CalloutState *calloutState) /* begin ffiPushSingleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -766,7 +775,7 @@ ffiArgByValuein(sqInt oop, CalloutState *calloutState) /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -803,7 +812,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c int floatType1; double floatValue; sqInt intValue; - int isAlien; + sqInt isAlien; sqInt isString; sqInt isStruct; sqInt length; @@ -928,8 +937,8 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c typedef struct { long a; float b; float c; } s2g; but not ones like this: typedef struct { int a; float b; int c; float d; } s2h; */ - doubleType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; - floatType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; + doubleType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; + floatType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; passField0InXmmReg = (doubleType == ((((int *) argSpec1))[1])) || ((floatType == ((((int *) argSpec1))[1])) && (floatType == ((((int *) argSpec1))[2]))); @@ -956,64 +965,64 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[0]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l6; + goto l1; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[0]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l6: /* end ffiPushDoubleFloat:in: */; + l1: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ value = ((sqLong) ((((long long *) ptrAddress))[0])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l8; + goto l2; } longAtput((calloutState->currentArg), value); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l8: /* end ffiPushSignedLongLong:in: */; + l2: /* end ffiPushSignedLongLong:in: */; } if (structSize > 8) { if (passField1InXmmReg) { /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[1]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l5; + goto l3; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[1]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l5: /* end ffiPushDoubleFloat:in: */; + l3: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ value1 = ((sqLong) ((((long long *) ptrAddress))[1])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l7; + goto l4; } longAtput((calloutState->currentArg), value1); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l7: /* end ffiPushSignedLongLong:in: */; + l4: /* end ffiPushSignedLongLong:in: */; } } return 0; @@ -1064,8 +1073,8 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c typedef struct { long a; float b; float c; } s2g; but not ones like this: typedef struct { int a; float b; int c; float d; } s2h; */ - doubleType1 = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; - floatType1 = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; + doubleType1 = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; + floatType1 = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; passField0InXmmReg1 = (doubleType1 == ((((int *) argSpec2))[1])) || ((floatType1 == ((((int *) argSpec2))[1])) && (floatType1 == ((((int *) argSpec2))[2]))); @@ -1092,64 +1101,64 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[0]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l10; + goto l6; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[0]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l10: /* end ffiPushDoubleFloat:in: */; + l6: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ value2 = ((sqLong) ((((long long *) ptrAddress))[0])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l12; + goto l8; } longAtput((calloutState->currentArg), value2); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l12: /* end ffiPushSignedLongLong:in: */; + l8: /* end ffiPushSignedLongLong:in: */; } if (structSize1 > 8) { if (passField1InXmmReg1) { /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[1]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l9; + goto l5; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[1]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l9: /* end ffiPushDoubleFloat:in: */; + l5: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ value11 = ((sqLong) ((((long long *) ptrAddress))[1])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value11)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l11; + goto l7; } longAtput((calloutState->currentArg), value11); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l11: /* end ffiPushSignedLongLong:in: */; + l7: /* end ffiPushSignedLongLong:in: */; } } return 0; @@ -1173,7 +1182,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1196,7 +1205,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)null)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1224,18 +1233,18 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (!((isPointers(ptrType)) && ((slotSizeOf(ptrType)) >= 2))) { err = FFIErrorWrongType; - goto l13; + goto l10; } specOop = fetchPointerofObject(0, ptrType); if (!((isWords(specOop)) && ((slotSizeOf(specOop)) > 0))) { err = FFIErrorWrongType; - goto l13; + goto l10; } spec = fetchPointerofObject(0, specOop); if (!(spec & FFIFlagAtomic)) { err = FFIErrorWrongType; - goto l13; + goto l10; } specType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if (specType != atomicType) { @@ -1246,11 +1255,11 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c && ((atomicType <= FFITypeSignedChar) && ((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))))) { err = FFIErrorCoercionFailed; - goto l13; + goto l10; } } err = 0; - l13: /* end ffiValidateExternalData:AtomicType: */; + l10: /* end ffiValidateExternalData:AtomicType: */; if (err != 0) { return err; } @@ -1298,7 +1307,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1337,7 +1346,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer1 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1353,7 +1362,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer2 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1371,7 +1380,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer3)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1393,7 +1402,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer4 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer4)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1409,7 +1418,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer5 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer5)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1427,7 +1436,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer6)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1470,7 +1479,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (valueOop & (BytesPerWord - 1)) { if (isIntegerObject(valueOop)) { intValue = integerValueOf(valueOop); - goto l4; + goto l12; } # if SPURVM @@ -1478,13 +1487,13 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* Immediate in Spur */ intValue = characterValueOf(valueOop); - goto l4; + goto l12; } if (isFloatObject(valueOop)) { /* Immediate in 64-bit Spur */ intValue = floatValueOf(valueOop); - goto l4; + goto l12; } # endif /* SPURVM */ @@ -1499,26 +1508,26 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c # else /* SPURVM */ if (isCharacterObject(valueOop)) { intValue = characterValueOf(valueOop); - goto l4; + goto l12; } # endif /* SPURVM */ if (isFloatObject(valueOop)) { intValue = floatValueOf(valueOop); - goto l4; + goto l12; } if (valueOop == (nilObject())) { intValue = 0; - goto l4; + goto l12; } if (valueOop == (falseObject())) { intValue = 0; - goto l4; + goto l12; } if (valueOop == (trueObject())) { intValue = 1; - goto l4; + goto l12; } if (isLargePositiveIntegerObject(valueOop)) { @@ -1526,18 +1535,18 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* Use cppIf: to get the return type of the function right. Should be sqInt on 32-bits. */ intValue = positive64BitValueOf(valueOop); - goto l4; + goto l12; # else /* BytesPerWord == 8 */ intValue = positive32BitValueOf(valueOop); - goto l4; + goto l12; # endif /* BytesPerWord == 8 */ } } intValue = signedMachineIntegerValueOf(valueOop); - l4: /* end ffiIntegerValueOf: */; + l12: /* end ffiIntegerValueOf: */; } if (failed()) { return FFIErrorCoercionFailed; @@ -1577,10 +1586,10 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiFloatValueOf: */ if (isFloatObject(valueOop)) { floatValue = floatValueOf(valueOop); - goto l3; + goto l11; } floatValue = ((double) (ffiIntegerValueOf(valueOop)) ); - l3: /* end ffiFloatValueOf: */; + l11: /* end ffiFloatValueOf: */; if (failed()) { return FFIErrorCoercionFailed; } @@ -1588,7 +1597,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushSingleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1603,7 +1612,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1634,7 +1643,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS { sqInt atomicType; char *copy; - int isAlien; + sqInt isAlien; sqInt isString; sqInt length; char *pointer; @@ -1685,7 +1694,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1724,7 +1733,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer1 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1740,7 +1749,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer2 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1758,7 +1767,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer3)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1780,7 +1789,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer4 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer4)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1796,7 +1805,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer5 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer5)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1814,7 +1823,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer6)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1932,7 +1941,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo sqInt retType; usqLong retVal; usqLong retVal1; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; sqInt strLen; @@ -1962,16 +1971,16 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } } else { - intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -2135,7 +2144,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal1)) ? retVal1 - : retVal1 & ((1U << (byteSize * 8)) - 1)); + : retVal1 & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop = (value == 0 ? falseObject() : trueObject()); @@ -2155,11 +2164,11 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal1 & (((((unsigned long)1)) << shift) - 1); + value = retVal1 & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop = integerObjectOf(value); @@ -2226,7 +2235,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt oop2; sqInt oop3; void *pointer; - long *ptr; + sqIntptr_t *ptr; sqInt *ptr1; sqInt requiredStackSize; sqInt result; @@ -2237,10 +2246,10 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt retType; usqLong retVal; usqLong retVal1; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; - int stackSize; + sqInt stackSize; sqInt strLen; sqInt strOop; char *strPtr; @@ -2356,18 +2365,18 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -2413,11 +2422,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } -l2: /* end ffiLogCallout: */; +l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -2443,16 +2452,16 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } } else { - intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -2617,7 +2626,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal1)) ? retVal1 - : retVal1 & ((1U << (byteSize * 8)) - 1)); + : retVal1 & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -2637,11 +2646,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal1 & (((((unsigned long)1)) << shift) - 1); + value = retVal1 & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -2723,7 +2732,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo { sqInt byteSize; usqLong mask; - int shift; + sqInt shift; usqLong value; assert(atomicType < FFITypeSingleFloat); @@ -2733,7 +2742,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal)) ? retVal - : retVal & ((1U << (byteSize * 8)) - 1)); + : retVal & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); return (value == 0 ? falseObject() : trueObject()); @@ -2752,11 +2761,11 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal & (((((unsigned long)1)) << shift) - 1); + value = retVal & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } return integerObjectOf(value); @@ -2926,7 +2935,7 @@ ffiLoadCalloutAddress(sqInt lit) { sqInt address; sqInt addressPtr; - long *ptr; + sqIntptr_t *ptr; /* Lookup the address */ @@ -3079,7 +3088,7 @@ ffiPushDoubleFloatin(double value, CalloutState *calloutState) { if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = value; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3112,7 +3121,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3140,7 +3149,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3168,7 +3177,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3188,7 +3197,7 @@ ffiPushPointerin(void *pointer, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3206,7 +3215,7 @@ ffiPushSignedBytein(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3224,7 +3233,7 @@ ffiPushSignedCharin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3242,7 +3251,7 @@ ffiPushSignedIntin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3282,7 +3291,7 @@ ffiPushSignedLongLongOopin(sqInt oop, CalloutState *calloutState) /* begin ffiPushSignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3300,7 +3309,7 @@ ffiPushSignedLongLongin(sqLong value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3318,7 +3327,7 @@ ffiPushSignedShortin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed short) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3336,7 +3345,7 @@ ffiPushSingleFloatin(float value, CalloutState *calloutState) { if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = value; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3368,7 +3377,7 @@ ffiPushStringOfLengthin(char *pointer, sqInt length, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3411,8 +3420,8 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) sqInt structSize1; sqLong value; sqLong value1; - sqLong value11; sqLong value2; + sqLong value3; passField1InXmmReg = 0; passField1InXmmReg1 = 0; @@ -3444,8 +3453,8 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) typedef struct { long a; float b; float c; } s2g; but not ones like this: typedef struct { int a; float b; int c; float d; } s2h; */ - doubleType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; - floatType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; + doubleType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; + floatType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; passField0InXmmReg = (doubleType == ((((int *) argSpec))[1])) || ((floatType == ((((int *) argSpec))[1])) && (floatType == ((((int *) argSpec))[2]))); @@ -3472,7 +3481,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[0]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3488,7 +3497,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) value = ((sqLong) ((((long long *) ptrAddress))[0])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3504,7 +3513,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[1]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3520,7 +3529,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) value1 = ((sqLong) ((((long long *) ptrAddress))[1])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3580,8 +3589,8 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) typedef struct { long a; float b; float c; } s2g; but not ones like this: typedef struct { int a; float b; int c; float d; } s2h; */ - doubleType1 = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; - floatType1 = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; + doubleType1 = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; + floatType1 = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; passField0InXmmReg1 = (doubleType1 == ((((int *) argSpec1))[1])) || ((floatType1 == ((((int *) argSpec1))[1])) && (floatType1 == ((((int *) argSpec1))[2]))); @@ -3608,64 +3617,64 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[0]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l6; + goto l5; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[0]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l6: /* end ffiPushDoubleFloat:in: */; + l5: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ value2 = ((sqLong) ((((long long *) ptrAddress))[0])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l8; + goto l6; } longAtput((calloutState->currentArg), value2); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l8: /* end ffiPushSignedLongLong:in: */; + l6: /* end ffiPushSignedLongLong:in: */; } if (structSize1 > 8) { if (passField1InXmmReg1) { /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) ptrAddress))[1]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l5; + goto l7; } storeFloatAtPointerfrom((calloutState->currentArg), (((double *) ptrAddress))[1]); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l5: /* end ffiPushDoubleFloat:in: */; + l7: /* end ffiPushDoubleFloat:in: */; } else { /* begin ffiPushSignedLongLong:in: */ - value11 = ((sqLong) ((((long long *) ptrAddress))[1])); + value3 = ((sqLong) ((((long long *) ptrAddress))[1])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value11)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value3)); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { - goto l7; + goto l8; } - longAtput((calloutState->currentArg), value11); + longAtput((calloutState->currentArg), value3); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } - l7: /* end ffiPushSignedLongLong:in: */; + l8: /* end ffiPushSignedLongLong:in: */; } } return 0; @@ -3689,7 +3698,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3731,8 +3740,8 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt typedef struct { long a; float b; float c; } s2g; but not ones like this: typedef struct { int a; float b; int c; float d; } s2h; */ - doubleType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; - floatType = (((int)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; + doubleType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeDoubleFloat; + floatType = (((sqInt)((usqInt)(FFITypeDoubleFloat) << FFIAtomicTypeShift))) + FFITypeSingleFloat; passField0InXmmReg = (doubleType == ((((int *) argSpec))[1])) || ((floatType == ((((int *) argSpec))[1])) && (floatType == ((((int *) argSpec))[2]))); @@ -3759,7 +3768,7 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) pointer))[0]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3775,7 +3784,7 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt value = ((sqLong) ((((long long *) pointer))[0])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3791,7 +3800,7 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = ((((double *) pointer))[1]); - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3807,7 +3816,7 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt value1 = ((sqLong) ((((long long *) pointer))[1])); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3837,7 +3846,7 @@ ffiPushUnsignedBytein(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3855,7 +3864,7 @@ ffiPushUnsignedCharin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3873,7 +3882,7 @@ ffiPushUnsignedIntin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3913,7 +3922,7 @@ ffiPushUnsignedLongLongOopin(sqInt oop, CalloutState *calloutState) /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3931,7 +3940,7 @@ ffiPushUnsignedLongLongin(usqLong value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3949,7 +3958,7 @@ ffiPushUnsignedShortin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned short) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -4236,6 +4245,20 @@ getModuleName(void) return "SqueakFFIPrims"; } + /* ThreadedFFICalloutStateForX64>>#incrementFloatRegisterIndex */ +static sqInt +incrementFloatRegisterIndex(CalloutState * self_in_incrementFloatRegisterIndex) +{ + return ((self_in_incrementFloatRegisterIndex->floatRegisterIndex) = ((self_in_incrementFloatRegisterIndex->floatRegisterIndex)) + 1); +} + + /* ThreadedFFICalloutStateForX64>>#incrementIntegerRegisterIndex */ +static sqInt +incrementIntegerRegisterIndex(CalloutState * self_in_incrementIntegerRegisterIndex) +{ + return ((self_in_incrementIntegerRegisterIndex->integerRegisterIndex) = ((self_in_incrementIntegerRegisterIndex->integerRegisterIndex)) + 1); +} + /* By default, disable logging */ @@ -4296,7 +4319,7 @@ nonRegisterStructReturnIsViaImplicitFirstArgument(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -4316,8 +4339,8 @@ primitiveCallout(void) { sqInt address; sqInt address1; + sqInt address11; sqInt address2; - sqInt address3; sqInt addressPtr; sqInt addressPtr1; char *allocation; @@ -4361,8 +4384,8 @@ primitiveCallout(void) sqInt functionName1; sqInt i; sqInt i1; + sqInt i11; sqInt i2; - sqInt i3; SixteenByteReturn intRet; SixteenByteReturn intRet1; usqLong mask; @@ -4375,17 +4398,17 @@ primitiveCallout(void) sqInt oop; sqInt oop1; sqInt oop11; - sqInt oop12; sqInt oop2; sqInt oop21; sqInt oop3; + sqInt oop31; sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; - sqInt *ptr2; - sqInt *ptr3; + sqIntptr_t *ptr; + sqInt *ptr1; + sqInt *ptr11; + sqIntptr_t *ptr2; sqInt requiredStackSize; sqInt requiredStackSize1; sqInt result; @@ -4406,14 +4429,14 @@ primitiveCallout(void) usqLong retVal1; usqLong retVal11; usqLong retVal2; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -4445,12 +4468,12 @@ primitiveCallout(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { result = ffiFail(FFIErrorNotFunction); - goto l3; + goto l13; } flags = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } /* begin ffiLoadCalloutAddress: */ @@ -4458,16 +4481,16 @@ primitiveCallout(void) addressPtr = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr)) && ((byteSizeOf(addressPtr)) == (sizeof(sqInt))))) { - address2 = ffiFail(FFIErrorBadAddress); - goto l7; + address1 = ffiFail(FFIErrorBadAddress); + goto l3; } - address2 = fetchPointerofObject(0, addressPtr); - l7: /* end ffiContentsOfHandle:errCode: */; + address1 = fetchPointerofObject(0, addressPtr); + l3: /* end ffiContentsOfHandle:errCode: */; if (failed()) { address = 0; - goto l8; + goto l4; } - if (address2 == 0) { + if (address1 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { @@ -4475,21 +4498,21 @@ primitiveCallout(void) } if ((slotSizeOf(externalFunction)) < 5) { address = ffiFail(FFIErrorNoModule); - goto l8; + goto l4; } - address2 = ffiLoadCalloutAddressFrom(externalFunction); + address1 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { address = 0; - goto l8; + goto l4; } ptr = firstIndexableField(addressPtr); - ptr[0] = address2; + ptr[0] = address1; } - address = address2; - l8: /* end ffiLoadCalloutAddress: */; + address = address1; + l4: /* end ffiLoadCalloutAddress: */; if (failed()) { result = 0; - goto l3; + goto l13; } /* must be array of arg types */ @@ -4497,14 +4520,14 @@ primitiveCallout(void) if (!((isArray(argTypeArray)) && ((slotSizeOf(argTypeArray)) == (nArgs + 1)))) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } # if COGMTVM if (!(((flags & FFICallTypesMask) == FFICallTypeCDecl) || ((flags & FFICallTypesMask) == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # else /* COGMTVM */ @@ -4513,7 +4536,7 @@ primitiveCallout(void) if (!((flags == FFICallTypeCDecl) || (flags == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # endif /* COGMTVM */ @@ -4525,7 +4548,7 @@ primitiveCallout(void) result = primitiveFailFor((null == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l3; + goto l13; } stackSize = (requiredStackSize < 0 ? DefaultMaxStackSize @@ -4538,7 +4561,7 @@ primitiveCallout(void) argClass = fetchPointerofObject(1, argType); if (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) { result = ffiFail(err); - goto l3; + goto l13; } allocation = alloca(((stackSize + ((calloutState->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -4557,18 +4580,18 @@ primitiveCallout(void) pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -4578,13 +4601,13 @@ primitiveCallout(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } for (i = 1; i <= nArgs; i += 1) { @@ -4604,13 +4627,13 @@ primitiveCallout(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } assert(!(failed())); @@ -4618,11 +4641,11 @@ primitiveCallout(void) if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } - l2: /* end ffiLogCallout: */; + l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -4648,16 +4671,16 @@ primitiveCallout(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } } else { - intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -4697,7 +4720,7 @@ primitiveCallout(void) cPointer = ((usqInt) retVal); if (cPointer == null) { oop3 = methodReturnValue(nilObject()); - goto l16; + goto l10; } cString = ((char *) cPointer); strLen = 0; @@ -4706,17 +4729,17 @@ primitiveCallout(void) } strOop = instantiateClassindexableSize(classString(), strLen); strPtr = firstIndexableField(strOop); - for (i2 = 0; i2 < strLen; i2 += 1) { - strPtr[i2] = (cString[i2]); + for (i1 = 0; i1 < strLen; i1 += 1) { + strPtr[i1] = (cString[i1]); } oop3 = methodReturnValue(strOop); - goto l16; + goto l10; } #if SPURVM oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -4732,8 +4755,8 @@ primitiveCallout(void) #else /* SPURVM */ pushRemappableOop(retType); oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -4750,7 +4773,7 @@ primitiveCallout(void) ; storePointerofObjectwithValue(1, retOop1, retType); oop3 = methodReturnValue(retOop1); - goto l16; + goto l10; } classOop = (((calloutState->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -4765,8 +4788,8 @@ primitiveCallout(void) retClass1 = popRemappableOop() #endif /* SPURVM */ ; - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(retClass1, 0); @@ -4779,7 +4802,7 @@ primitiveCallout(void) ; storePointerofObjectwithValue(0, retOop1, oop2); oop3 = methodReturnValue(retOop1); - l16: /* end ffiReturnPointer:ofType:in: */; + l10: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -4792,22 +4815,22 @@ primitiveCallout(void) retOop = instantiateClassindexableSize(retClass, 0); #if SPURVM - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop); - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); retOop = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState->structReturnSize)) + memcpy(firstIndexableField(oop1), (returnStructInRegisters((calloutState->structReturnSize)) ? ((void *)((&intRet))) : (calloutState->limit)), (calloutState->structReturnSize)); - storePointerofObjectwithValue(0, retOop, oop11); + storePointerofObjectwithValue(0, retOop, oop1); oop3 = methodReturnValue(retOop); } result1 = oop3; - goto l18; + goto l12; } if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { oop3 = floatObjectOf(floatRet); @@ -4822,11 +4845,11 @@ primitiveCallout(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal1)) ? retVal1 - : retVal1 & ((1U << (byteSize * 8)) - 1)); + : retVal1 & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); - goto l15; + goto l6; } if (atomicType <= FFITypeSignedInt) { @@ -4842,15 +4865,15 @@ primitiveCallout(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal1 & (((((unsigned long)1)) << shift) - 1); + value = retVal1 & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); - goto l15; + goto l6; } oop3 = (atomicType & 1 ? (BytesPerWord == 8 @@ -4859,23 +4882,23 @@ primitiveCallout(void) : (BytesPerWord == 8 ? positive64BitIntegerFor(retVal1) : positive32BitIntegerFor(retVal1))); - goto l15; + goto l6; } oop3 = ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType & 1 ? signed64BitIntegerFor(retVal1) : positive64BitIntegerFor(retVal1)) : characterObjectOf(retVal1 & 0xFF)); - l15: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l6: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } result1 = methodReturnValue(oop3); - l18: /* end ffiCalloutTo:SpecOnStack:in: */; + l12: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { free(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]); } result = result1; - l3: /* end ffiCall:ArgArrayOrNil:NumArgs: */; + l13: /* end ffiCall:ArgArrayOrNil:NumArgs: */; if (!((result == PrimErrObjectMayMove) && (((retryCount += 1)) <= (nArgs + 1)))) break; tenuringIncrementalGC(); @@ -4886,12 +4909,12 @@ primitiveCallout(void) nArgs1 = methodArgumentCount(); if (!(isKindOfClass(externalFunction, classExternalFunction()))) { ffiFail(FFIErrorNotFunction); - goto l6; + goto l26; } flags1 = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } /* begin ffiLoadCalloutAddress: */ @@ -4899,37 +4922,37 @@ primitiveCallout(void) addressPtr1 = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr1)) && ((byteSizeOf(addressPtr1)) == (sizeof(sqInt))))) { - address3 = ffiFail(FFIErrorBadAddress); - goto l9; + address11 = ffiFail(FFIErrorBadAddress); + goto l20; } - address3 = fetchPointerofObject(0, addressPtr1); -l9: /* end ffiContentsOfHandle:errCode: */; + address11 = fetchPointerofObject(0, addressPtr1); +l20: /* end ffiContentsOfHandle:errCode: */; if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - if (address3 == 0) { + if (address11 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, integerObjectOf(-1)); } if ((slotSizeOf(externalFunction)) < 5) { - address1 = ffiFail(FFIErrorNoModule); - goto l10; + address2 = ffiFail(FFIErrorNoModule); + goto l15; } - address3 = ffiLoadCalloutAddressFrom(externalFunction); + address11 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - ptr1 = firstIndexableField(addressPtr1); - ptr1[0] = address3; + ptr2 = firstIndexableField(addressPtr1); + ptr2[0] = address11; } - address1 = address3; -l10: /* end ffiLoadCalloutAddress: */; + address2 = address11; +l15: /* end ffiLoadCalloutAddress: */; if (failed()) { - goto l6; + goto l26; } /* must be array of arg types */ @@ -4937,14 +4960,14 @@ primitiveCallout(void) if (!((isArray(argTypeArray1)) && ((slotSizeOf(argTypeArray1)) == (nArgs1 + 1)))) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } # if COGMTVM if (!(((flags1 & FFICallTypesMask) == FFICallTypeCDecl) || ((flags1 & FFICallTypesMask) == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # else /* COGMTVM */ @@ -4953,7 +4976,7 @@ primitiveCallout(void) if (!((flags1 == FFICallTypeCDecl) || (flags1 == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # endif /* COGMTVM */ @@ -4965,7 +4988,7 @@ primitiveCallout(void) primitiveFailFor((null == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l6; + goto l26; } stackSize1 = (requiredStackSize1 < 0 ? DefaultMaxStackSize @@ -4978,7 +5001,7 @@ primitiveCallout(void) argClass1 = fetchPointerofObject(1, argType1); if (((err1 = ffiCheckReturnWithin(argSpec1, argClass1, calloutState1))) != 0) { ffiFail(err1); - goto l6; + goto l26; } allocation1 = alloca(((stackSize1 + ((calloutState1->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -4997,18 +5020,18 @@ primitiveCallout(void) pointer1 = (calloutState1->limit); if (((calloutState1->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState1->integerRegisters))[(calloutState1->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState1->integerRegisterIndex = ((calloutState1->integerRegisterIndex)) + 1); + (calloutState1->integerRegisterIndex) = ((calloutState1->integerRegisterIndex)) + 1; } else { if ((((calloutState1->currentArg)) + WordSize) > ((calloutState1->limit))) { err1 = FFIErrorCallFrameTooBig; - goto l4; + goto l24; } longAtput((calloutState1->currentArg), pointer1); (calloutState1->currentArg = ((calloutState1->currentArg)) + WordSize); } err1 = 0; - l4: /* end ffiPushPointer:in: */; + l24: /* end ffiPushPointer:in: */; if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -5017,23 +5040,23 @@ primitiveCallout(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } - for (i1 = 1; i1 <= nArgs1; i1 += 1) { - argType1 = fetchPointerofObject(i1, argTypeArray1); + for (i2 = 1; i2 <= nArgs1; i2 += 1) { + argType1 = fetchPointerofObject(i2, argTypeArray1); argSpec1 = fetchPointerofObject(0, argType1); argClass1 = fetchPointerofObject(1, argType1); - oop1 = (null == null - ? stackValue(nArgs1 - i1) - : fetchPointerofObject(i1 - 1, null)); - err1 = ffiArgumentSpecClassin(oop1, argSpec1, argClass1, calloutState1); + oop4 = (null == null + ? stackValue(nArgs1 - i2) + : fetchPointerofObject(i2 - 1, null)); + err1 = ffiArgumentSpecClassin(oop4, argSpec1, argClass1, calloutState1); if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -5042,13 +5065,13 @@ primitiveCallout(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } assert(!(failed())); @@ -5056,11 +5079,11 @@ primitiveCallout(void) if (ffiLogEnabled) { functionName1 = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName1))) { - goto l5; + goto l16; } ffiLogCallOfLength(firstIndexableField(functionName1), byteSizeOf(functionName1)); } -l5: /* end ffiLogCallout: */; +l16: /* end ffiLogCallout: */; if ((requiredStackSize1 < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize1 = ((calloutState1->currentArg)) - ((calloutState1->argVector)); @@ -5086,16 +5109,16 @@ primitiveCallout(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + intRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -5134,8 +5157,8 @@ primitiveCallout(void) /* begin ffiReturnCStringFrom: */ cPointer1 = ((usqInt) retVal2); if (cPointer1 == null) { - oop4 = methodReturnValue(nilObject()); - goto l24; + oop31 = methodReturnValue(nilObject()); + goto l25; } cString1 = ((char *) cPointer1); strLen1 = 0; @@ -5144,17 +5167,17 @@ primitiveCallout(void) } strOop1 = instantiateClassindexableSize(classString(), strLen1); strPtr1 = firstIndexableField(strOop1); - for (i3 = 0; i3 < strLen1; i3 += 1) { - strPtr1[i3] = (cString1[i3]); + for (i11 = 0; i11 < strLen1; i11 += 1) { + strPtr1[i11] = (cString1[i11]); } - oop4 = methodReturnValue(strOop1); - goto l24; + oop31 = methodReturnValue(strOop1); + goto l25; } #if SPURVM oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -5170,8 +5193,8 @@ primitiveCallout(void) #else /* SPURVM */ pushRemappableOop(retType1); oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -5187,8 +5210,8 @@ primitiveCallout(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(1, retOop11, retType1); - oop4 = methodReturnValue(retOop11); - goto l24; + oop31 = methodReturnValue(retOop11); + goto l25; } classOop1 = (((calloutState1->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -5203,8 +5226,8 @@ primitiveCallout(void) retClass11 = popRemappableOop() #endif /* SPURVM */ ; - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(retClass11, 0); @@ -5216,8 +5239,8 @@ primitiveCallout(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(0, retOop11, oop21); - oop4 = methodReturnValue(retOop11); - l24: /* end ffiReturnPointer:ofType:in: */; + oop31 = methodReturnValue(retOop11); + l25: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -5230,25 +5253,25 @@ primitiveCallout(void) retOop2 = instantiateClassindexableSize(retClass2, 0); #if SPURVM - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop2); - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); retOop2 = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop12), (returnStructInRegisters((calloutState1->structReturnSize)) + memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState1->structReturnSize)) ? ((void *)((&intRet1))) : (calloutState1->limit)), (calloutState1->structReturnSize)); - storePointerofObjectwithValue(0, retOop2, oop12); - oop4 = methodReturnValue(retOop2); + storePointerofObjectwithValue(0, retOop2, oop11); + oop31 = methodReturnValue(retOop2); } - result2 = oop4; - goto l26; + result2 = oop31; + goto l17; } if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { - oop4 = floatObjectOf(floatRet1); + oop31 = floatObjectOf(floatRet1); } else { /* begin ffiCreateIntegralResultOop:ofAtomicType:in: */ @@ -5260,11 +5283,11 @@ primitiveCallout(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(retVal11)) ? retVal11 - : retVal11 & ((1U << (byteSize1 * 8)) - 1)); - oop4 = (value1 == 0 + : retVal11 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); + oop31 = (value1 == 0 ? falseObject() : trueObject()); - goto l23; + goto l19; } if (atomicType2 <= FFITypeSignedInt) { @@ -5280,39 +5303,39 @@ primitiveCallout(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = retVal11 & (((((unsigned long)1)) << shift1) - 1); + value1 = retVal11 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } - oop4 = integerObjectOf(value1); - goto l23; + oop31 = integerObjectOf(value1); + goto l19; } - oop4 = (atomicType2 & 1 + oop31 = (atomicType2 & 1 ? (BytesPerWord == 8 ? signed64BitIntegerFor(retVal11) : signed32BitIntegerFor(retVal11)) : (BytesPerWord == 8 ? positive64BitIntegerFor(retVal11) : positive32BitIntegerFor(retVal11))); - goto l23; + goto l19; } - oop4 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) + oop31 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType2 & 1 ? signed64BitIntegerFor(retVal11) : positive64BitIntegerFor(retVal11)) : characterObjectOf(retVal11 & 0xFF)); - l23: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l19: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } - result2 = methodReturnValue(oop4); -l26: /* end ffiCalloutTo:SpecOnStack:in: */; + result2 = methodReturnValue(oop31); +l17: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { free(((calloutState1->stringArgs))[(calloutState1->stringArgIndex = ((calloutState1->stringArgIndex)) - 1)]); } -l6: /* end ffiCall:ArgArrayOrNil:NumArgs: */; +l26: /* end ffiCall:ArgArrayOrNil:NumArgs: */; # endif /* COGMTVM */ @@ -5329,8 +5352,8 @@ primitiveCalloutWithArgs(void) { sqInt address; sqInt address1; + sqInt address11; sqInt address2; - sqInt address3; sqInt addressPtr; sqInt addressPtr1; char *allocation; @@ -5375,8 +5398,8 @@ primitiveCalloutWithArgs(void) sqInt functionName1; sqInt i; sqInt i1; + sqInt i11; sqInt i2; - sqInt i3; SixteenByteReturn intRet; SixteenByteReturn intRet1; usqLong mask; @@ -5387,17 +5410,17 @@ primitiveCalloutWithArgs(void) sqInt oop; sqInt oop1; sqInt oop11; - sqInt oop12; sqInt oop2; sqInt oop21; sqInt oop3; + sqInt oop31; sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; - sqInt *ptr2; - sqInt *ptr3; + sqIntptr_t *ptr; + sqInt *ptr1; + sqInt *ptr11; + sqIntptr_t *ptr2; sqInt requiredStackSize; sqInt requiredStackSize1; sqInt result; @@ -5418,14 +5441,14 @@ primitiveCalloutWithArgs(void) usqLong retVal1; usqLong retVal11; usqLong retVal2; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -5461,12 +5484,12 @@ primitiveCalloutWithArgs(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { result = ffiFail(FFIErrorNotFunction); - goto l3; + goto l13; } flags = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } /* begin ffiLoadCalloutAddress: */ @@ -5474,16 +5497,16 @@ primitiveCalloutWithArgs(void) addressPtr = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr)) && ((byteSizeOf(addressPtr)) == (sizeof(sqInt))))) { - address2 = ffiFail(FFIErrorBadAddress); - goto l7; + address1 = ffiFail(FFIErrorBadAddress); + goto l3; } - address2 = fetchPointerofObject(0, addressPtr); - l7: /* end ffiContentsOfHandle:errCode: */; + address1 = fetchPointerofObject(0, addressPtr); + l3: /* end ffiContentsOfHandle:errCode: */; if (failed()) { address = 0; - goto l8; + goto l4; } - if (address2 == 0) { + if (address1 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { @@ -5491,21 +5514,21 @@ primitiveCalloutWithArgs(void) } if ((slotSizeOf(externalFunction)) < 5) { address = ffiFail(FFIErrorNoModule); - goto l8; + goto l4; } - address2 = ffiLoadCalloutAddressFrom(externalFunction); + address1 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { address = 0; - goto l8; + goto l4; } ptr = firstIndexableField(addressPtr); - ptr[0] = address2; + ptr[0] = address1; } - address = address2; - l8: /* end ffiLoadCalloutAddress: */; + address = address1; + l4: /* end ffiLoadCalloutAddress: */; if (failed()) { result = 0; - goto l3; + goto l13; } /* must be array of arg types */ @@ -5513,14 +5536,14 @@ primitiveCalloutWithArgs(void) if (!((isArray(argTypeArray)) && ((slotSizeOf(argTypeArray)) == (nArgs + 1)))) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } # if COGMTVM if (!(((flags & FFICallTypesMask) == FFICallTypeCDecl) || ((flags & FFICallTypesMask) == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # else /* COGMTVM */ @@ -5529,7 +5552,7 @@ primitiveCalloutWithArgs(void) if (!((flags == FFICallTypeCDecl) || (flags == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # endif /* COGMTVM */ @@ -5541,7 +5564,7 @@ primitiveCalloutWithArgs(void) result = primitiveFailFor((argArray == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l3; + goto l13; } stackSize = (requiredStackSize < 0 ? DefaultMaxStackSize @@ -5554,7 +5577,7 @@ primitiveCalloutWithArgs(void) argClass = fetchPointerofObject(1, argType); if (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) { result = ffiFail(err); - goto l3; + goto l13; } allocation = alloca(((stackSize + ((calloutState->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -5573,18 +5596,18 @@ primitiveCalloutWithArgs(void) pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1; } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -5594,13 +5617,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } for (i = 1; i <= nArgs; i += 1) { @@ -5620,13 +5643,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } assert(!(failed())); @@ -5634,11 +5657,11 @@ primitiveCalloutWithArgs(void) if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } - l2: /* end ffiLogCallout: */; + l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -5664,16 +5687,16 @@ primitiveCalloutWithArgs(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + floatRet = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } } else { - intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); + intRet = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3], ((calloutState->integerRegisters))[4], ((calloutState->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -5713,7 +5736,7 @@ primitiveCalloutWithArgs(void) cPointer = ((usqInt) retVal); if (cPointer == null) { oop3 = methodReturnValue(nilObject()); - goto l16; + goto l10; } cString = ((char *) cPointer); strLen = 0; @@ -5722,17 +5745,17 @@ primitiveCalloutWithArgs(void) } strOop = instantiateClassindexableSize(classString(), strLen); strPtr = firstIndexableField(strOop); - for (i2 = 0; i2 < strLen; i2 += 1) { - strPtr[i2] = (cString[i2]); + for (i1 = 0; i1 < strLen; i1 += 1) { + strPtr[i1] = (cString[i1]); } oop3 = methodReturnValue(strOop); - goto l16; + goto l10; } #if SPURVM oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -5748,8 +5771,8 @@ primitiveCalloutWithArgs(void) #else /* SPURVM */ pushRemappableOop(retType); oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -5766,7 +5789,7 @@ primitiveCalloutWithArgs(void) ; storePointerofObjectwithValue(1, retOop1, retType); oop3 = methodReturnValue(retOop1); - goto l16; + goto l10; } classOop = (((calloutState->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -5781,8 +5804,8 @@ primitiveCalloutWithArgs(void) retClass1 = popRemappableOop() #endif /* SPURVM */ ; - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) retVal)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) retVal)); #if SPURVM retOop1 = instantiateClassindexableSize(retClass1, 0); @@ -5795,7 +5818,7 @@ primitiveCalloutWithArgs(void) ; storePointerofObjectwithValue(0, retOop1, oop2); oop3 = methodReturnValue(retOop1); - l16: /* end ffiReturnPointer:ofType:in: */; + l10: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -5808,22 +5831,22 @@ primitiveCalloutWithArgs(void) retOop = instantiateClassindexableSize(retClass, 0); #if SPURVM - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop); - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); retOop = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState->structReturnSize)) + memcpy(firstIndexableField(oop1), (returnStructInRegisters((calloutState->structReturnSize)) ? ((void *)((&intRet))) : (calloutState->limit)), (calloutState->structReturnSize)); - storePointerofObjectwithValue(0, retOop, oop11); + storePointerofObjectwithValue(0, retOop, oop1); oop3 = methodReturnValue(retOop); } result1 = oop3; - goto l18; + goto l12; } if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { oop3 = floatObjectOf(floatRet); @@ -5838,11 +5861,11 @@ primitiveCalloutWithArgs(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal1)) ? retVal1 - : retVal1 & ((1U << (byteSize * 8)) - 1)); + : retVal1 & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); - goto l15; + goto l6; } if (atomicType <= FFITypeSignedInt) { @@ -5858,15 +5881,15 @@ primitiveCalloutWithArgs(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal1 & (((((unsigned long)1)) << shift) - 1); + value = retVal1 & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); - goto l15; + goto l6; } oop3 = (atomicType & 1 ? (BytesPerWord == 8 @@ -5875,23 +5898,23 @@ primitiveCalloutWithArgs(void) : (BytesPerWord == 8 ? positive64BitIntegerFor(retVal1) : positive32BitIntegerFor(retVal1))); - goto l15; + goto l6; } oop3 = ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType & 1 ? signed64BitIntegerFor(retVal1) : positive64BitIntegerFor(retVal1)) : characterObjectOf(retVal1 & 0xFF)); - l15: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l6: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } result1 = methodReturnValue(oop3); - l18: /* end ffiCalloutTo:SpecOnStack:in: */; + l12: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { free(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]); } result = result1; - l3: /* end ffiCall:ArgArrayOrNil:NumArgs: */; + l13: /* end ffiCall:ArgArrayOrNil:NumArgs: */; if (!((result == PrimErrObjectMayMove) && (((retryCount += 1)) <= (nArgs + 1)))) break; tenuringIncrementalGC(); @@ -5908,12 +5931,12 @@ primitiveCalloutWithArgs(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { ffiFail(FFIErrorNotFunction); - goto l6; + goto l26; } flags1 = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } /* begin ffiLoadCalloutAddress: */ @@ -5921,37 +5944,37 @@ primitiveCalloutWithArgs(void) addressPtr1 = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr1)) && ((byteSizeOf(addressPtr1)) == (sizeof(sqInt))))) { - address3 = ffiFail(FFIErrorBadAddress); - goto l9; + address11 = ffiFail(FFIErrorBadAddress); + goto l20; } - address3 = fetchPointerofObject(0, addressPtr1); -l9: /* end ffiContentsOfHandle:errCode: */; + address11 = fetchPointerofObject(0, addressPtr1); +l20: /* end ffiContentsOfHandle:errCode: */; if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - if (address3 == 0) { + if (address11 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, integerObjectOf(-1)); } if ((slotSizeOf(externalFunction)) < 5) { - address1 = ffiFail(FFIErrorNoModule); - goto l10; + address2 = ffiFail(FFIErrorNoModule); + goto l15; } - address3 = ffiLoadCalloutAddressFrom(externalFunction); + address11 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - ptr1 = firstIndexableField(addressPtr1); - ptr1[0] = address3; + ptr2 = firstIndexableField(addressPtr1); + ptr2[0] = address11; } - address1 = address3; -l10: /* end ffiLoadCalloutAddress: */; + address2 = address11; +l15: /* end ffiLoadCalloutAddress: */; if (failed()) { - goto l6; + goto l26; } /* must be array of arg types */ @@ -5959,14 +5982,14 @@ primitiveCalloutWithArgs(void) if (!((isArray(argTypeArray1)) && ((slotSizeOf(argTypeArray1)) == (nArgs + 1)))) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } # if COGMTVM if (!(((flags1 & FFICallTypesMask) == FFICallTypeCDecl) || ((flags1 & FFICallTypesMask) == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # else /* COGMTVM */ @@ -5975,7 +5998,7 @@ primitiveCalloutWithArgs(void) if (!((flags1 == FFICallTypeCDecl) || (flags1 == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # endif /* COGMTVM */ @@ -5987,7 +6010,7 @@ primitiveCalloutWithArgs(void) primitiveFailFor((argArray == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l6; + goto l26; } stackSize1 = (requiredStackSize1 < 0 ? DefaultMaxStackSize @@ -6000,7 +6023,7 @@ primitiveCalloutWithArgs(void) argClass1 = fetchPointerofObject(1, argType1); if (((err1 = ffiCheckReturnWithin(argSpec1, argClass1, calloutState1))) != 0) { ffiFail(err1); - goto l6; + goto l26; } allocation1 = alloca(((stackSize1 + ((calloutState1->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -6019,18 +6042,18 @@ primitiveCalloutWithArgs(void) pointer1 = (calloutState1->limit); if (((calloutState1->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState1->integerRegisters))[(calloutState1->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState1->integerRegisterIndex = ((calloutState1->integerRegisterIndex)) + 1); + (calloutState1->integerRegisterIndex) = ((calloutState1->integerRegisterIndex)) + 1; } else { if ((((calloutState1->currentArg)) + WordSize) > ((calloutState1->limit))) { err1 = FFIErrorCallFrameTooBig; - goto l4; + goto l24; } longAtput((calloutState1->currentArg), pointer1); (calloutState1->currentArg = ((calloutState1->currentArg)) + WordSize); } err1 = 0; - l4: /* end ffiPushPointer:in: */; + l24: /* end ffiPushPointer:in: */; if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -6039,23 +6062,23 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } - for (i1 = 1; i1 <= nArgs; i1 += 1) { - argType1 = fetchPointerofObject(i1, argTypeArray1); + for (i2 = 1; i2 <= nArgs; i2 += 1) { + argType1 = fetchPointerofObject(i2, argTypeArray1); argSpec1 = fetchPointerofObject(0, argType1); argClass1 = fetchPointerofObject(1, argType1); - oop1 = (argArray == null - ? stackValue(nArgs - i1) - : fetchPointerofObject(i1 - 1, argArray)); - err1 = ffiArgumentSpecClassin(oop1, argSpec1, argClass1, calloutState1); + oop4 = (argArray == null + ? stackValue(nArgs - i2) + : fetchPointerofObject(i2 - 1, argArray)); + err1 = ffiArgumentSpecClassin(oop4, argSpec1, argClass1, calloutState1); if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -6064,13 +6087,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } assert(!(failed())); @@ -6078,11 +6101,11 @@ primitiveCalloutWithArgs(void) if (ffiLogEnabled) { functionName1 = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName1))) { - goto l5; + goto l16; } ffiLogCallOfLength(firstIndexableField(functionName1), byteSizeOf(functionName1)); } -l5: /* end ffiLogCallout: */; +l16: /* end ffiLogCallout: */; if ((requiredStackSize1 < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize1 = ((calloutState1->currentArg)) - ((calloutState1->argVector)); @@ -6108,16 +6131,16 @@ primitiveCalloutWithArgs(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + floatRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(long, long, long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); + intRet1 = dispatchFunctionPointerwithwithwithwithwithwith(((SixteenByteReturn (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3], ((calloutState1->integerRegisters))[4], ((calloutState1->integerRegisters))[5]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -6156,8 +6179,8 @@ primitiveCalloutWithArgs(void) /* begin ffiReturnCStringFrom: */ cPointer1 = ((usqInt) retVal2); if (cPointer1 == null) { - oop4 = methodReturnValue(nilObject()); - goto l24; + oop31 = methodReturnValue(nilObject()); + goto l25; } cString1 = ((char *) cPointer1); strLen1 = 0; @@ -6166,17 +6189,17 @@ primitiveCalloutWithArgs(void) } strOop1 = instantiateClassindexableSize(classString(), strLen1); strPtr1 = firstIndexableField(strOop1); - for (i3 = 0; i3 < strLen1; i3 += 1) { - strPtr1[i3] = (cString1[i3]); + for (i11 = 0; i11 < strLen1; i11 += 1) { + strPtr1[i11] = (cString1[i11]); } - oop4 = methodReturnValue(strOop1); - goto l24; + oop31 = methodReturnValue(strOop1); + goto l25; } #if SPURVM oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -6192,8 +6215,8 @@ primitiveCalloutWithArgs(void) #else /* SPURVM */ pushRemappableOop(retType1); oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -6209,8 +6232,8 @@ primitiveCalloutWithArgs(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(1, retOop11, retType1); - oop4 = methodReturnValue(retOop11); - goto l24; + oop31 = methodReturnValue(retOop11); + goto l25; } classOop1 = (((calloutState1->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -6225,8 +6248,8 @@ primitiveCalloutWithArgs(void) retClass11 = popRemappableOop() #endif /* SPURVM */ ; - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) retVal2)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) retVal2)); #if SPURVM retOop11 = instantiateClassindexableSize(retClass11, 0); @@ -6238,8 +6261,8 @@ primitiveCalloutWithArgs(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(0, retOop11, oop21); - oop4 = methodReturnValue(retOop11); - l24: /* end ffiReturnPointer:ofType:in: */; + oop31 = methodReturnValue(retOop11); + l25: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -6252,25 +6275,25 @@ primitiveCalloutWithArgs(void) retOop2 = instantiateClassindexableSize(retClass2, 0); #if SPURVM - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop2); - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); retOop2 = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop12), (returnStructInRegisters((calloutState1->structReturnSize)) + memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState1->structReturnSize)) ? ((void *)((&intRet1))) : (calloutState1->limit)), (calloutState1->structReturnSize)); - storePointerofObjectwithValue(0, retOop2, oop12); - oop4 = methodReturnValue(retOop2); + storePointerofObjectwithValue(0, retOop2, oop11); + oop31 = methodReturnValue(retOop2); } - result2 = oop4; - goto l26; + result2 = oop31; + goto l17; } if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { - oop4 = floatObjectOf(floatRet1); + oop31 = floatObjectOf(floatRet1); } else { /* begin ffiCreateIntegralResultOop:ofAtomicType:in: */ @@ -6282,11 +6305,11 @@ primitiveCalloutWithArgs(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(retVal11)) ? retVal11 - : retVal11 & ((1U << (byteSize1 * 8)) - 1)); - oop4 = (value1 == 0 + : retVal11 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); + oop31 = (value1 == 0 ? falseObject() : trueObject()); - goto l23; + goto l19; } if (atomicType2 <= FFITypeSignedInt) { @@ -6302,39 +6325,39 @@ primitiveCalloutWithArgs(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = retVal11 & (((((unsigned long)1)) << shift1) - 1); + value1 = retVal11 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } - oop4 = integerObjectOf(value1); - goto l23; + oop31 = integerObjectOf(value1); + goto l19; } - oop4 = (atomicType2 & 1 + oop31 = (atomicType2 & 1 ? (BytesPerWord == 8 ? signed64BitIntegerFor(retVal11) : signed32BitIntegerFor(retVal11)) : (BytesPerWord == 8 ? positive64BitIntegerFor(retVal11) : positive32BitIntegerFor(retVal11))); - goto l23; + goto l19; } - oop4 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) + oop31 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType2 & 1 ? signed64BitIntegerFor(retVal11) : positive64BitIntegerFor(retVal11)) : characterObjectOf(retVal11 & 0xFF)); - l23: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l19: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } - result2 = methodReturnValue(oop4); -l26: /* end ffiCalloutTo:SpecOnStack:in: */; + result2 = methodReturnValue(oop31); +l17: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { free(((calloutState1->stringArgs))[(calloutState1->stringArgIndex = ((calloutState1->stringArgIndex)) - 1)]); } -l6: /* end ffiCall:ArgArrayOrNil:NumArgs: */; +l26: /* end ffiCall:ArgArrayOrNil:NumArgs: */; # endif /* COGMTVM */ @@ -6376,9 +6399,7 @@ primitiveCreateManualSurface(void) if (result < 0) { return primitiveFail(); } - result = (BytesPerWord == 8 - ? signed64BitIntegerFor(result) - : signed32BitIntegerFor(result)); + result = signed32BitIntegerFor(result); return popthenPush(6, result); } @@ -6417,7 +6438,7 @@ primitiveFFIAllocate(void) sqInt addr; sqInt byteSize; sqInt oop; - long *ptr; + sqIntptr_t *ptr; byteSize = stackIntegerValue(0); if (failed()) { @@ -6427,7 +6448,7 @@ primitiveFFIAllocate(void) if (addr == 0) { return primitiveFail(); } - oop = instantiateClassindexableSize(classExternalAddress(), sizeof(long)); + oop = instantiateClassindexableSize(classExternalAddress(), sizeof(sqIntptr_t)); ptr = firstIndexableField(oop); ptr[0] = addr; return popthenPush(2, oop); @@ -6558,13 +6579,13 @@ primitiveFFIFloatAtPut(void) EXPORT(sqInt) primitiveFFIFree(void) { - long addr; + sqIntptr_t addr; sqInt oop; - long *ptr; + sqIntptr_t *ptr; oop = stackObjectValue(0); if (!(((fetchClassOf(oop)) == (classExternalAddress())) - && ((byteSizeOf(oop)) == (sizeof(long))))) { + && ((byteSizeOf(oop)) == (sizeof(sqIntptr_t))))) { return primitiveFail(); } ptr = firstIndexableField(oop); @@ -6572,7 +6593,7 @@ primitiveFFIFree(void) /* Don't you dare to free Squeak's memory! */ addr = ptr[0]; if ((addr == 0) - || ((((((unsigned long)addr)) & ((sizeof(long)) - 1)) != 0) + || ((((((usqIntptr_t)addr)) & ((sizeof(sqIntptr_t)) - 1)) != 0) || (isInMemory(addr)))) { return primitiveFail(); } @@ -6648,7 +6669,7 @@ primitiveFFIIntegerAt(void) if (isSigned) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = integerObjectOf(value); @@ -6660,7 +6681,7 @@ primitiveFFIIntegerAt(void) if (byteSize < 8) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = signed64BitIntegerFor(value); @@ -6884,7 +6905,7 @@ primitiveLogCallsTo(void) EXPORT(sqInt) primitiveSetManualSurfacePointer(void) { - unsigned long ptr; + usqIntptr_t ptr; sqInt result; sqInt surfaceID; @@ -7047,7 +7068,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c b/src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c index d54c0938b3..88222de0ac 100644 --- a/src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c +++ b/src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + VMPluginCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - ThreadedX64Win64FFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe + ThreadedX64Win64FFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e */ -static char __buildInfo[] = "ThreadedX64Win64FFIPlugin VMMaker.oscog-eem.1977 uuid: e12daf50-ab4d-4d62-9c65-18cd20e5c0fe " __DATE__ ; +static char __buildInfo[] = "ThreadedX64Win64FFIPlugin VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e " __DATE__ ; @@ -44,6 +44,9 @@ static char __buildInfo[] = "ThreadedX64Win64FFIPlugin VMMaker.oscog-eem.1977 uu #if defined(__GNUC__) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) # define setsp(sp) asm volatile ("movl %0,%%esp" : : "m"(sp)) # define getsp() ({ void *esp; asm volatile ("movl %%esp,%0" : "=r"(esp) : ); esp;}) +# elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64)) +# define setsp(sp) asm volatile ("movq %0,%%rsp" : : "m"(sp)) +# define getsp() ({ void *rsp; asm volatile ("movq %%rsp,%0" : "=r"(rsp) : ); rsp;}) # elif defined(__GNUC__) && (defined(__arm__)) # define setsp(sp) asm volatile ("ldr %%sp, %0" : : "m"(sp)) # define getsp() ({ void *sp; asm volatile ("mov %0, %%sp" : "=r"(sp) : ); sp;}) @@ -91,10 +94,14 @@ static char __buildInfo[] = "ThreadedX64Win64FFIPlugin VMMaker.oscog-eem.1977 uu # if WIN32 # define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 # endif +# elif defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64) +# if WIN32 | WIN64 +# define PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1 +# endif #endif /* defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__) */ #if !defined(ALLOCA_LIES_SO_USE_GETSP) -# if defined(__MINGW32__) && (__GNUC__ >= 3) +# if defined(__MINGW32__) && (__GNUC__ >= 3) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)) /* * cygwin -mno-cygwin (MinGW) gcc 3.4.x's alloca is a library routine that answers * %esp + 4, so the outgoing stack is offset by one word if uncorrected. @@ -187,7 +194,7 @@ warning(char *s) { /* Print an error message but don't exit. */ #define PrimErrNotFound 11 #define PrimErrObjectMayMove 14 #if !defined(SPURVM) /* Allow this to be overridden on the compiler command line */ -# define SPURVM 0 +# define SPURVM 1 #endif #define WordSize 8 @@ -207,8 +214,10 @@ typedef struct { sqInt floatRegisterIndex; sqInt integerRegisters [NumIntRegArgs]; double floatRegisters [NumFloatRegArgs]; + int floatRegisterSignature; } CalloutState; +#define ThreadedFFICalloutStateForX64Win64 CalloutState #define ThreadedFFICalloutStateForX64 CalloutState #define ThreadedFFICalloutState CalloutState @@ -263,13 +272,15 @@ static sqInt ffiReturnType(sqInt specOnStack); static sqInt ffiSupportsCallingConvention(sqInt aCallingConvention); static sqInt ffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType); EXPORT(const char *) getModuleName(void); +static sqInt incrementFloatRegisterIndex(CalloutState * self_in_incrementFloatRegisterIndex); +static sqInt incrementIntegerRegisterIndex(CalloutState * self_in_incrementIntegerRegisterIndex); EXPORT(sqInt) initialiseModule(void); static sqInt isAlien(sqInt anOop); static sqInt isAtomicType(sqInt typeSpec); static sqInt isDirectAlien(sqInt oop); static sqInt msg(char *s); static sqInt nonRegisterStructReturnIsViaImplicitFirstArgument(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveCallout(void); EXPORT(void) primitiveCalloutWithArgs(void); EXPORT(sqInt) primitiveCreateManualSurface(void); @@ -290,7 +301,7 @@ EXPORT(sqInt) primitiveSetManualSurfacePointer(void); static sqInt registerArgsSlop(void); static sqInt returnStructInRegisters(sqInt returnStructSize); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); static sqInt sizeField(sqInt oop); static sqInt startOfData(sqInt oop); @@ -378,11 +389,11 @@ static sqInt (*ownVM)(sqInt flags); static sqInt (*pop)(sqInt nItems); static sqInt (*popthenPush)(sqInt nItems, sqInt oop); static sqInt (*popRemappableOop)(void); -static usqInt (*positive32BitIntegerFor)(unsigned int integerValue); +static sqInt (*positive32BitIntegerFor)(unsigned int integerValue); static usqInt (*positive32BitValueOf)(sqInt oop); static sqInt (*positive64BitIntegerFor)(usqLong integerValue); static usqLong (*positive64BitValueOf)(sqInt oop); -static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop); +static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop); static sqInt (*primitiveErrorTable)(void); static sqInt (*primitiveFail)(void); static sqInt (*primitiveFailFor)(sqInt reasonCode); @@ -393,7 +404,7 @@ static sqInt (*pushRemappableOop)(sqInt oop); static sqInt (*signed32BitIntegerFor)(sqInt integerValue); static sqInt (*signed64BitIntegerFor)(sqLong integerValue); static sqLong (*signed64BitValueOf)(sqInt oop); -static long (*signedMachineIntegerValueOf)(sqInt oop); +static sqIntptr_t (*signedMachineIntegerValueOf)(sqInt oop); static sqInt (*slotSizeOf)(sqInt oop); static sqInt (*stackIntegerValue)(sqInt offset); static sqInt (*stackObjectValue)(sqInt offset); @@ -473,11 +484,11 @@ extern sqInt ownVM(sqInt flags); extern sqInt pop(sqInt nItems); extern sqInt popthenPush(sqInt nItems, sqInt oop); extern sqInt popRemappableOop(void); -extern usqInt positive32BitIntegerFor(unsigned int integerValue); +extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern usqInt positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); extern sqInt primitiveErrorTable(void); extern sqInt primitiveFail(void); extern sqInt primitiveFailFor(sqInt reasonCode); @@ -488,7 +499,7 @@ extern sqInt pushRemappableOop(sqInt oop); extern sqInt signed32BitIntegerFor(sqInt integerValue); extern sqInt signed64BitIntegerFor(sqLong integerValue); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern sqInt slotSizeOf(sqInt oop); extern sqInt stackIntegerValue(sqInt offset); extern sqInt stackObjectValue(sqInt offset); @@ -502,9 +513,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "X64Win64FFIPlugin VMMaker.oscog-eem.1977 (i)" + "X64Win64FFIPlugin VMMaker.oscog-nice.1990 (i)" #else - "X64Win64FFIPlugin VMMaker.oscog-eem.1977 (e)" + "X64Win64FFIPlugin VMMaker.oscog-nice.1990 (e)" #endif ; @@ -587,7 +598,7 @@ ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize) if (!(((byteOffset + byteSize) - 1) <= rcvrSize)) { return primitiveFail(); } - addr = ((long) (firstIndexableField(rcvr))); + addr = ((sqIntptr_t) (firstIndexableField(rcvr))); } addr = (addr + byteOffset) - 1; return addr; @@ -743,7 +754,9 @@ ffiArgByValuein(sqInt oop, CalloutState *calloutState) /* begin ffiPushSingleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -758,7 +771,9 @@ ffiArgByValuein(sqInt oop, CalloutState *calloutState) /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -780,6 +795,8 @@ ffiArgByValuein(sqInt oop, CalloutState *calloutState) static sqInt ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *calloutState) { + usqLong arg; + usqLong arg1; sqInt *argSpec1; sqInt *argSpec2; sqInt argSpecSize; @@ -791,7 +808,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c sqInt err; double floatValue; sqInt intValue; - int isAlien; + sqInt isAlien; sqInt isString; sqInt isStruct; sqInt length; @@ -818,6 +835,8 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c sqInt valueOop; sqInt valueOop1; + arg = 0; + arg1 = 0; /* Prefetch class (we'll need it) */ oopClass = fetchClassOf(oop); @@ -890,18 +909,19 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (structSize <= 0) { return FFIErrorStructSize; } - if ((structSize <= 16) + if ((structSize <= WordSize) && ((structSize & (structSize - 1)) == 0)) { + memcpy((&arg), ptrAddress, structSize); /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqLong) ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = arg; + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { return FFIErrorCallFrameTooBig; } - longAtput((calloutState->currentArg), ((usqLong) ptrAddress)); + longAtput((calloutState->currentArg), arg); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } return 0; @@ -910,7 +930,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -948,18 +968,19 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (structSize1 <= 0) { return FFIErrorStructSize; } - if ((structSize1 <= 16) + if ((structSize1 <= WordSize) && ((structSize1 & (structSize1 - 1)) == 0)) { + memcpy((&arg1), ptrAddress, structSize1); /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqLong) ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = arg1; + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { return FFIErrorCallFrameTooBig; } - longAtput((calloutState->currentArg), ((usqLong) ptrAddress)); + longAtput((calloutState->currentArg), arg1); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } return 0; @@ -968,7 +989,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -989,7 +1010,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1012,7 +1033,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)null)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1040,18 +1061,18 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (!((isPointers(ptrType)) && ((slotSizeOf(ptrType)) >= 2))) { err = FFIErrorWrongType; - goto l5; + goto l2; } specOop = fetchPointerofObject(0, ptrType); if (!((isWords(specOop)) && ((slotSizeOf(specOop)) > 0))) { err = FFIErrorWrongType; - goto l5; + goto l2; } spec = fetchPointerofObject(0, specOop); if (!(spec & FFIFlagAtomic)) { err = FFIErrorWrongType; - goto l5; + goto l2; } specType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if (specType != atomicType) { @@ -1062,11 +1083,11 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c && ((atomicType <= FFITypeSignedChar) && ((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))))) { err = FFIErrorCoercionFailed; - goto l5; + goto l2; } } err = 0; - l5: /* end ffiValidateExternalData:AtomicType: */; + l2: /* end ffiValidateExternalData:AtomicType: */; if (err != 0) { return err; } @@ -1114,7 +1135,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1153,7 +1174,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer1 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1169,7 +1190,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer2 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1187,7 +1208,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer3)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1209,7 +1230,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer4 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer4)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1225,7 +1246,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c pointer5 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer5)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1243,7 +1264,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer6)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1286,7 +1307,7 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c if (valueOop & (BytesPerWord - 1)) { if (isIntegerObject(valueOop)) { intValue = integerValueOf(valueOop); - goto l4; + goto l6; } # if SPURVM @@ -1294,13 +1315,13 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* Immediate in Spur */ intValue = characterValueOf(valueOop); - goto l4; + goto l6; } if (isFloatObject(valueOop)) { /* Immediate in 64-bit Spur */ intValue = floatValueOf(valueOop); - goto l4; + goto l6; } # endif /* SPURVM */ @@ -1315,26 +1336,26 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c # else /* SPURVM */ if (isCharacterObject(valueOop)) { intValue = characterValueOf(valueOop); - goto l4; + goto l6; } # endif /* SPURVM */ if (isFloatObject(valueOop)) { intValue = floatValueOf(valueOop); - goto l4; + goto l6; } if (valueOop == (nilObject())) { intValue = 0; - goto l4; + goto l6; } if (valueOop == (falseObject())) { intValue = 0; - goto l4; + goto l6; } if (valueOop == (trueObject())) { intValue = 1; - goto l4; + goto l6; } if (isLargePositiveIntegerObject(valueOop)) { @@ -1342,18 +1363,18 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* Use cppIf: to get the return type of the function right. Should be sqInt on 32-bits. */ intValue = positive64BitValueOf(valueOop); - goto l4; + goto l6; # else /* BytesPerWord == 8 */ intValue = positive32BitValueOf(valueOop); - goto l4; + goto l6; # endif /* BytesPerWord == 8 */ } } intValue = signedMachineIntegerValueOf(valueOop); - l4: /* end ffiIntegerValueOf: */; + l6: /* end ffiIntegerValueOf: */; } if (failed()) { return FFIErrorCoercionFailed; @@ -1404,7 +1425,9 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushSingleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1419,7 +1442,9 @@ ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *c /* begin ffiPushDoubleFloat:in: */ if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = floatValue; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1450,7 +1475,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS { sqInt atomicType; char *copy; - int isAlien; + sqInt isAlien; sqInt isString; sqInt length; char *pointer; @@ -1501,7 +1526,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1540,7 +1565,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer1 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1556,7 +1581,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer2 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer2)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1574,7 +1599,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer3)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1596,7 +1621,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer4 = ((void *) (firstIndexableField(oop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer4)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1612,7 +1637,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS pointer5 = ((void *) (longAt(oop + BaseHeaderSize))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer5)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1630,7 +1655,7 @@ ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutS : longAt((oop + BaseHeaderSize) + BytesPerOop))); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer6)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -1746,7 +1771,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; sqInt strLen; @@ -1769,7 +1794,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo if ((0 + (cStackAlignment())) > 0) { setsp((calloutState->argVector)); } - if (((calloutState->floatRegisterIndex)) > 0) { + if (((calloutState->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState->floatRegisters))[0], ((calloutState->floatRegisters))[1], ((calloutState->floatRegisters))[2], ((calloutState->floatRegisters))[3], ((calloutState->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -1777,16 +1802,16 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) procAddr), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -1947,7 +1972,7 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop = (value == 0 ? falseObject() : trueObject()); @@ -1967,11 +1992,11 @@ ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop = integerObjectOf(value); @@ -2038,7 +2063,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt oop2; sqInt oop3; void *pointer; - long *ptr; + sqIntptr_t *ptr; sqInt *ptr1; sqInt requiredStackSize; sqInt result; @@ -2047,10 +2072,10 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n sqInt retOop; sqInt retOop1; sqInt retType; - int shift; + sqInt shift; sqInt specLiteral; sqInt specLiteral1; - int stackSize; + sqInt stackSize; sqInt strLen; sqInt strOop; char *strPtr; @@ -2167,18 +2192,18 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -2224,11 +2249,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } -l2: /* end ffiLogCallout: */; +l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -2246,7 +2271,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n if ((0 + (cStackAlignment())) > 0) { setsp((calloutState->argVector)); } - if (((calloutState->floatRegisterIndex)) > 0) { + if (((calloutState->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState->floatRegisters))[0], ((calloutState->floatRegisters))[1], ((calloutState->floatRegisters))[2], ((calloutState->floatRegisters))[3], ((calloutState->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -2254,16 +2279,16 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -2425,7 +2450,7 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); @@ -2445,11 +2470,11 @@ ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt n && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); @@ -2531,7 +2556,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo { sqInt byteSize; usqLong mask; - int shift; + sqInt shift; usqLong value; assert(atomicType < FFITypeSingleFloat); @@ -2541,7 +2566,7 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(retVal)) ? retVal - : retVal & ((1U << (byteSize * 8)) - 1)); + : retVal & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); return (value == 0 ? falseObject() : trueObject()); @@ -2560,11 +2585,11 @@ ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, Callo && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = retVal & (((((unsigned long)1)) << shift) - 1); + value = retVal & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } return integerObjectOf(value); @@ -2734,7 +2759,7 @@ ffiLoadCalloutAddress(sqInt lit) { sqInt address; sqInt addressPtr; - long *ptr; + sqIntptr_t *ptr; /* Lookup the address */ @@ -2887,7 +2912,9 @@ ffiPushDoubleFloatin(double value, CalloutState *calloutState) { if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { ((calloutState->floatRegisters))[(calloutState->floatRegisterIndex)] = value; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -2920,7 +2947,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -2948,7 +2975,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -2976,7 +3003,7 @@ ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -2996,7 +3023,7 @@ ffiPushPointerin(void *pointer, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3014,7 +3041,7 @@ ffiPushSignedBytein(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3032,7 +3059,7 @@ ffiPushSignedCharin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3050,7 +3077,7 @@ ffiPushSignedIntin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3090,7 +3117,7 @@ ffiPushSignedLongLongOopin(sqInt oop, CalloutState *calloutState) /* begin ffiPushSignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3108,7 +3135,7 @@ ffiPushSignedLongLongin(sqLong value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqInt) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3126,7 +3153,7 @@ ffiPushSignedShortin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((signed short) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3144,7 +3171,9 @@ ffiPushSingleFloatin(float value, CalloutState *calloutState) { if (((calloutState->floatRegisterIndex)) < NumFloatRegArgs) { (((float *) (((calloutState->floatRegisters)) + ((calloutState->floatRegisterIndex)))))[0] = value; - (calloutState->floatRegisterIndex = ((calloutState->floatRegisterIndex)) + 1); + /* begin incrementFloatRegisterIndex */ + (calloutState->floatRegisterSignature) = ((calloutState->floatRegisterSignature)) + (1U << ((calloutState->floatRegisterIndex))); + (calloutState->integerRegisterIndex) = ((calloutState->floatRegisterIndex) = ((calloutState->floatRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3176,7 +3205,7 @@ ffiPushStringOfLengthin(char *pointer, sqInt length, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)copy)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3195,6 +3224,8 @@ ffiPushStringOfLengthin(char *pointer, sqInt length, CalloutState *calloutState) static sqInt ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) { + usqLong arg; + usqLong arg1; sqInt *argSpec; sqInt *argSpec1; sqInt argSpecSize; @@ -3204,6 +3235,8 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) sqInt structSize; sqInt structSize1; + arg = 0; + arg1 = 0; ptrClass = fetchClassOf(oop); if (ptrClass == (classExternalAddress())) { @@ -3222,18 +3255,19 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) if (structSize <= 0) { return FFIErrorStructSize; } - if ((structSize <= 16) + if ((structSize <= WordSize) && ((structSize & (structSize - 1)) == 0)) { + memcpy((&arg), ptrAddress, structSize); /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqLong) ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = arg; + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { return FFIErrorCallFrameTooBig; } - longAtput((calloutState->currentArg), ((usqLong) ptrAddress)); + longAtput((calloutState->currentArg), arg); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } return 0; @@ -3242,7 +3276,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3280,18 +3314,19 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) if (structSize1 <= 0) { return FFIErrorStructSize; } - if ((structSize1 <= 16) + if ((structSize1 <= WordSize) && ((structSize1 & (structSize1 - 1)) == 0)) { + memcpy((&arg1), ptrAddress, structSize1); /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqLong) ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = arg1; + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { return FFIErrorCallFrameTooBig; } - longAtput((calloutState->currentArg), ((usqLong) ptrAddress)); + longAtput((calloutState->currentArg), arg1); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } return 0; @@ -3300,7 +3335,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3321,7 +3356,7 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)ptrAddress)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3339,21 +3374,25 @@ ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState) static sqInt ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt *argSpec, sqInt argSpecSize, CalloutState *calloutState) { + usqLong arg; + + arg = 0; if (structSize <= 0) { return FFIErrorStructSize; } - if ((structSize <= 16) + if ((structSize <= WordSize) && ((structSize & (structSize - 1)) == 0)) { + memcpy((&arg), pointer, structSize); /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { - ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((usqLong) pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = arg; + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { return FFIErrorCallFrameTooBig; } - longAtput((calloutState->currentArg), ((usqLong) pointer)); + longAtput((calloutState->currentArg), arg); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } return 0; @@ -3362,7 +3401,7 @@ ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt /* begin ffiPushPointer:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3380,7 +3419,7 @@ ffiPushUnsignedBytein(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3398,7 +3437,7 @@ ffiPushUnsignedCharin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned char) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3416,7 +3455,7 @@ ffiPushUnsignedIntin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3456,7 +3495,7 @@ ffiPushUnsignedLongLongOopin(sqInt oop, CalloutState *calloutState) /* begin ffiPushUnsignedLongLong:in: */ if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3474,7 +3513,7 @@ ffiPushUnsignedLongLongin(usqLong value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = value; - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3492,7 +3531,7 @@ ffiPushUnsignedShortin(sqInt value, CalloutState *calloutState) { if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((unsigned short) value)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { @@ -3780,6 +3819,47 @@ getModuleName(void) } +/* There are only 4 args passed by register int or float. + So we can't distinguish the float index from the integer index. + So we have to increment both. + + Consequently, floatRegisterIndex cannot be used anymore to detect presence + of float parameter. + However, we set a signature bitmap indicating which register position is + used to pass a float. + + IMPLEMENTATION NOTES: + There are code generator hacks that bypass the accessors. + So we cannot just redefine the method floatRegisterIndex as + ^integerRegisterIndex. Instead we must maintain the two indices + */ + + /* ThreadedFFICalloutStateForX64Win64>>#incrementFloatRegisterIndex */ +static sqInt +incrementFloatRegisterIndex(CalloutState * self_in_incrementFloatRegisterIndex) +{ + (self_in_incrementFloatRegisterIndex->floatRegisterSignature) = ((self_in_incrementFloatRegisterIndex->floatRegisterSignature)) + (1U << ((self_in_incrementFloatRegisterIndex->floatRegisterIndex))); + return ((self_in_incrementFloatRegisterIndex->integerRegisterIndex) = ((self_in_incrementFloatRegisterIndex->floatRegisterIndex) = ((self_in_incrementFloatRegisterIndex->floatRegisterIndex)) + 1)); +} + + +/* There are only 4 args passed by register int or float. + So we can't distinguish the float index from the integer index. + So we have to increment both. + + IMPLEMENTATION NOTES: + There are code generator hacks that bypass the accessors. + So we cannot just redefine the method floatRegisterIndex as + ^integerRegisterIndex. Instead we must maintain the two indices */ + + /* ThreadedFFICalloutStateForX64Win64>>#incrementIntegerRegisterIndex */ +static sqInt +incrementIntegerRegisterIndex(CalloutState * self_in_incrementIntegerRegisterIndex) +{ + return ((self_in_incrementIntegerRegisterIndex->floatRegisterIndex) = ((self_in_incrementIntegerRegisterIndex->integerRegisterIndex) = ((self_in_incrementIntegerRegisterIndex->integerRegisterIndex)) + 1)); +} + + /* By default, disable logging */ /* ThreadedFFIPlugin>>#initialiseModule */ @@ -3839,7 +3919,7 @@ nonRegisterStructReturnIsViaImplicitFirstArgument(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -3859,8 +3939,8 @@ primitiveCallout(void) { sqInt address; sqInt address1; + sqInt address11; sqInt address2; - sqInt address3; sqInt addressPtr; sqInt addressPtr1; char *allocation; @@ -3904,8 +3984,8 @@ primitiveCallout(void) sqInt functionName1; sqInt i; sqInt i1; + sqInt i11; sqInt i2; - sqInt i3; usqLong intRet; usqLong intRet1; usqLong mask; @@ -3918,17 +3998,17 @@ primitiveCallout(void) sqInt oop; sqInt oop1; sqInt oop11; - sqInt oop12; sqInt oop2; sqInt oop21; sqInt oop3; + sqInt oop31; sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; - sqInt *ptr2; - sqInt *ptr3; + sqIntptr_t *ptr; + sqInt *ptr1; + sqInt *ptr11; + sqIntptr_t *ptr2; sqInt requiredStackSize; sqInt requiredStackSize1; sqInt result; @@ -3945,14 +4025,14 @@ primitiveCallout(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -3986,12 +4066,12 @@ primitiveCallout(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { result = ffiFail(FFIErrorNotFunction); - goto l3; + goto l13; } flags = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } /* begin ffiLoadCalloutAddress: */ @@ -3999,16 +4079,16 @@ primitiveCallout(void) addressPtr = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr)) && ((byteSizeOf(addressPtr)) == (sizeof(sqInt))))) { - address2 = ffiFail(FFIErrorBadAddress); - goto l7; + address1 = ffiFail(FFIErrorBadAddress); + goto l3; } - address2 = fetchPointerofObject(0, addressPtr); - l7: /* end ffiContentsOfHandle:errCode: */; + address1 = fetchPointerofObject(0, addressPtr); + l3: /* end ffiContentsOfHandle:errCode: */; if (failed()) { address = 0; - goto l8; + goto l4; } - if (address2 == 0) { + if (address1 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { @@ -4016,21 +4096,21 @@ primitiveCallout(void) } if ((slotSizeOf(externalFunction)) < 5) { address = ffiFail(FFIErrorNoModule); - goto l8; + goto l4; } - address2 = ffiLoadCalloutAddressFrom(externalFunction); + address1 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { address = 0; - goto l8; + goto l4; } ptr = firstIndexableField(addressPtr); - ptr[0] = address2; + ptr[0] = address1; } - address = address2; - l8: /* end ffiLoadCalloutAddress: */; + address = address1; + l4: /* end ffiLoadCalloutAddress: */; if (failed()) { result = 0; - goto l3; + goto l13; } /* must be array of arg types */ @@ -4038,14 +4118,14 @@ primitiveCallout(void) if (!((isArray(argTypeArray)) && ((slotSizeOf(argTypeArray)) == (nArgs + 1)))) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } # if COGMTVM if (!(((flags & FFICallTypesMask) == FFICallTypeCDecl) || ((flags & FFICallTypesMask) == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # else /* COGMTVM */ @@ -4054,7 +4134,7 @@ primitiveCallout(void) if (!((flags == FFICallTypeCDecl) || (flags == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # endif /* COGMTVM */ @@ -4066,7 +4146,7 @@ primitiveCallout(void) result = primitiveFailFor((null == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l3; + goto l13; } stackSize = (requiredStackSize < 0 ? DefaultMaxStackSize @@ -4079,7 +4159,7 @@ primitiveCallout(void) argClass = fetchPointerofObject(1, argType); if (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) { result = ffiFail(err); - goto l3; + goto l13; } allocation = alloca(((stackSize + ((calloutState->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -4098,18 +4178,18 @@ primitiveCallout(void) pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -4119,13 +4199,13 @@ primitiveCallout(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } for (i = 1; i <= nArgs; i += 1) { @@ -4145,13 +4225,13 @@ primitiveCallout(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } assert(!(failed())); @@ -4159,11 +4239,11 @@ primitiveCallout(void) if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } - l2: /* end ffiLogCallout: */; + l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -4181,7 +4261,7 @@ primitiveCallout(void) if ((0 + (cStackAlignment())) > 0) { setsp((calloutState->argVector)); } - if (((calloutState->floatRegisterIndex)) > 0) { + if (((calloutState->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState->floatRegisters))[0], ((calloutState->floatRegisters))[1], ((calloutState->floatRegisters))[2], ((calloutState->floatRegisters))[3], ((calloutState->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -4189,16 +4269,16 @@ primitiveCallout(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -4236,7 +4316,7 @@ primitiveCallout(void) cPointer = ((usqInt) intRet); if (cPointer == null) { oop3 = methodReturnValue(nilObject()); - goto l16; + goto l10; } cString = ((char *) cPointer); strLen = 0; @@ -4245,17 +4325,17 @@ primitiveCallout(void) } strOop = instantiateClassindexableSize(classString(), strLen); strPtr = firstIndexableField(strOop); - for (i2 = 0; i2 < strLen; i2 += 1) { - strPtr[i2] = (cString[i2]); + for (i1 = 0; i1 < strLen; i1 += 1) { + strPtr[i1] = (cString[i1]); } oop3 = methodReturnValue(strOop); - goto l16; + goto l10; } #if SPURVM oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -4271,8 +4351,8 @@ primitiveCallout(void) #else /* SPURVM */ pushRemappableOop(retType); oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -4289,7 +4369,7 @@ primitiveCallout(void) ; storePointerofObjectwithValue(1, retOop1, retType); oop3 = methodReturnValue(retOop1); - goto l16; + goto l10; } classOop = (((calloutState->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -4304,8 +4384,8 @@ primitiveCallout(void) retClass1 = popRemappableOop() #endif /* SPURVM */ ; - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(retClass1, 0); @@ -4318,7 +4398,7 @@ primitiveCallout(void) ; storePointerofObjectwithValue(0, retOop1, oop2); oop3 = methodReturnValue(retOop1); - l16: /* end ffiReturnPointer:ofType:in: */; + l10: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -4331,22 +4411,22 @@ primitiveCallout(void) retOop = instantiateClassindexableSize(retClass, 0); #if SPURVM - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop); - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); retOop = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState->structReturnSize)) + memcpy(firstIndexableField(oop1), (returnStructInRegisters((calloutState->structReturnSize)) ? (&intRet) : (calloutState->limit)), (calloutState->structReturnSize)); - storePointerofObjectwithValue(0, retOop, oop11); + storePointerofObjectwithValue(0, retOop, oop1); oop3 = methodReturnValue(retOop); } result1 = oop3; - goto l18; + goto l12; } if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { oop3 = floatObjectOf(floatRet); @@ -4360,11 +4440,11 @@ primitiveCallout(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); - goto l15; + goto l6; } if (atomicType <= FFITypeSignedInt) { @@ -4380,15 +4460,15 @@ primitiveCallout(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); - goto l15; + goto l6; } oop3 = (atomicType & 1 ? (BytesPerWord == 8 @@ -4397,23 +4477,23 @@ primitiveCallout(void) : (BytesPerWord == 8 ? positive64BitIntegerFor(intRet) : positive32BitIntegerFor(intRet))); - goto l15; + goto l6; } oop3 = ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType & 1 ? signed64BitIntegerFor(intRet) : positive64BitIntegerFor(intRet)) : characterObjectOf(intRet & 0xFF)); - l15: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l6: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } result1 = methodReturnValue(oop3); - l18: /* end ffiCalloutTo:SpecOnStack:in: */; + l12: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { free(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]); } result = result1; - l3: /* end ffiCall:ArgArrayOrNil:NumArgs: */; + l13: /* end ffiCall:ArgArrayOrNil:NumArgs: */; if (!((result == PrimErrObjectMayMove) && (((retryCount += 1)) <= (nArgs + 1)))) break; tenuringIncrementalGC(); @@ -4424,12 +4504,12 @@ primitiveCallout(void) nArgs1 = methodArgumentCount(); if (!(isKindOfClass(externalFunction, classExternalFunction()))) { ffiFail(FFIErrorNotFunction); - goto l6; + goto l26; } flags1 = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } /* begin ffiLoadCalloutAddress: */ @@ -4437,37 +4517,37 @@ primitiveCallout(void) addressPtr1 = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr1)) && ((byteSizeOf(addressPtr1)) == (sizeof(sqInt))))) { - address3 = ffiFail(FFIErrorBadAddress); - goto l9; + address11 = ffiFail(FFIErrorBadAddress); + goto l20; } - address3 = fetchPointerofObject(0, addressPtr1); -l9: /* end ffiContentsOfHandle:errCode: */; + address11 = fetchPointerofObject(0, addressPtr1); +l20: /* end ffiContentsOfHandle:errCode: */; if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - if (address3 == 0) { + if (address11 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, integerObjectOf(-1)); } if ((slotSizeOf(externalFunction)) < 5) { - address1 = ffiFail(FFIErrorNoModule); - goto l10; + address2 = ffiFail(FFIErrorNoModule); + goto l15; } - address3 = ffiLoadCalloutAddressFrom(externalFunction); + address11 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - ptr1 = firstIndexableField(addressPtr1); - ptr1[0] = address3; + ptr2 = firstIndexableField(addressPtr1); + ptr2[0] = address11; } - address1 = address3; -l10: /* end ffiLoadCalloutAddress: */; + address2 = address11; +l15: /* end ffiLoadCalloutAddress: */; if (failed()) { - goto l6; + goto l26; } /* must be array of arg types */ @@ -4475,14 +4555,14 @@ primitiveCallout(void) if (!((isArray(argTypeArray1)) && ((slotSizeOf(argTypeArray1)) == (nArgs1 + 1)))) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } # if COGMTVM if (!(((flags1 & FFICallTypesMask) == FFICallTypeCDecl) || ((flags1 & FFICallTypesMask) == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # else /* COGMTVM */ @@ -4491,7 +4571,7 @@ primitiveCallout(void) if (!((flags1 == FFICallTypeCDecl) || (flags1 == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # endif /* COGMTVM */ @@ -4503,7 +4583,7 @@ primitiveCallout(void) primitiveFailFor((null == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l6; + goto l26; } stackSize1 = (requiredStackSize1 < 0 ? DefaultMaxStackSize @@ -4516,7 +4596,7 @@ primitiveCallout(void) argClass1 = fetchPointerofObject(1, argType1); if (((err1 = ffiCheckReturnWithin(argSpec1, argClass1, calloutState1))) != 0) { ffiFail(err1); - goto l6; + goto l26; } allocation1 = alloca(((stackSize1 + ((calloutState1->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -4535,18 +4615,18 @@ primitiveCallout(void) pointer1 = (calloutState1->limit); if (((calloutState1->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState1->integerRegisters))[(calloutState1->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState1->integerRegisterIndex = ((calloutState1->integerRegisterIndex)) + 1); + (calloutState1->floatRegisterIndex) = ((calloutState1->integerRegisterIndex) = ((calloutState1->integerRegisterIndex)) + 1); } else { if ((((calloutState1->currentArg)) + WordSize) > ((calloutState1->limit))) { err1 = FFIErrorCallFrameTooBig; - goto l4; + goto l24; } longAtput((calloutState1->currentArg), pointer1); (calloutState1->currentArg = ((calloutState1->currentArg)) + WordSize); } err1 = 0; - l4: /* end ffiPushPointer:in: */; + l24: /* end ffiPushPointer:in: */; if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -4555,23 +4635,23 @@ primitiveCallout(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } - for (i1 = 1; i1 <= nArgs1; i1 += 1) { - argType1 = fetchPointerofObject(i1, argTypeArray1); + for (i2 = 1; i2 <= nArgs1; i2 += 1) { + argType1 = fetchPointerofObject(i2, argTypeArray1); argSpec1 = fetchPointerofObject(0, argType1); argClass1 = fetchPointerofObject(1, argType1); - oop1 = (null == null - ? stackValue(nArgs1 - i1) - : fetchPointerofObject(i1 - 1, null)); - err1 = ffiArgumentSpecClassin(oop1, argSpec1, argClass1, calloutState1); + oop4 = (null == null + ? stackValue(nArgs1 - i2) + : fetchPointerofObject(i2 - 1, null)); + err1 = ffiArgumentSpecClassin(oop4, argSpec1, argClass1, calloutState1); if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -4580,13 +4660,13 @@ primitiveCallout(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } assert(!(failed())); @@ -4594,11 +4674,11 @@ primitiveCallout(void) if (ffiLogEnabled) { functionName1 = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName1))) { - goto l5; + goto l16; } ffiLogCallOfLength(firstIndexableField(functionName1), byteSizeOf(functionName1)); } -l5: /* end ffiLogCallout: */; +l16: /* end ffiLogCallout: */; if ((requiredStackSize1 < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize1 = ((calloutState1->currentArg)) - ((calloutState1->argVector)); @@ -4616,7 +4696,7 @@ primitiveCallout(void) if ((0 + (cStackAlignment())) > 0) { setsp((calloutState1->argVector)); } - if (((calloutState1->floatRegisterIndex)) > 0) { + if (((calloutState1->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState1->floatRegisters))[0], ((calloutState1->floatRegisters))[1], ((calloutState1->floatRegisters))[2], ((calloutState1->floatRegisters))[3], ((calloutState1->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -4624,16 +4704,16 @@ primitiveCallout(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + intRet1 = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -4670,8 +4750,8 @@ primitiveCallout(void) /* begin ffiReturnCStringFrom: */ cPointer1 = ((usqInt) intRet1); if (cPointer1 == null) { - oop4 = methodReturnValue(nilObject()); - goto l24; + oop31 = methodReturnValue(nilObject()); + goto l25; } cString1 = ((char *) cPointer1); strLen1 = 0; @@ -4680,17 +4760,17 @@ primitiveCallout(void) } strOop1 = instantiateClassindexableSize(classString(), strLen1); strPtr1 = firstIndexableField(strOop1); - for (i3 = 0; i3 < strLen1; i3 += 1) { - strPtr1[i3] = (cString1[i3]); + for (i11 = 0; i11 < strLen1; i11 += 1) { + strPtr1[i11] = (cString1[i11]); } - oop4 = methodReturnValue(strOop1); - goto l24; + oop31 = methodReturnValue(strOop1); + goto l25; } #if SPURVM oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -4706,8 +4786,8 @@ primitiveCallout(void) #else /* SPURVM */ pushRemappableOop(retType1); oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -4723,8 +4803,8 @@ primitiveCallout(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(1, retOop11, retType1); - oop4 = methodReturnValue(retOop11); - goto l24; + oop31 = methodReturnValue(retOop11); + goto l25; } classOop1 = (((calloutState1->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -4739,8 +4819,8 @@ primitiveCallout(void) retClass11 = popRemappableOop() #endif /* SPURVM */ ; - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(retClass11, 0); @@ -4752,8 +4832,8 @@ primitiveCallout(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(0, retOop11, oop21); - oop4 = methodReturnValue(retOop11); - l24: /* end ffiReturnPointer:ofType:in: */; + oop31 = methodReturnValue(retOop11); + l25: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -4766,25 +4846,25 @@ primitiveCallout(void) retOop2 = instantiateClassindexableSize(retClass2, 0); #if SPURVM - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop2); - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); retOop2 = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop12), (returnStructInRegisters((calloutState1->structReturnSize)) + memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState1->structReturnSize)) ? (&intRet1) : (calloutState1->limit)), (calloutState1->structReturnSize)); - storePointerofObjectwithValue(0, retOop2, oop12); - oop4 = methodReturnValue(retOop2); + storePointerofObjectwithValue(0, retOop2, oop11); + oop31 = methodReturnValue(retOop2); } - result2 = oop4; - goto l26; + result2 = oop31; + goto l17; } if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { - oop4 = floatObjectOf(floatRet1); + oop31 = floatObjectOf(floatRet1); } else { /* begin ffiCreateIntegralResultOop:ofAtomicType:in: */ @@ -4795,11 +4875,11 @@ primitiveCallout(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); - oop4 = (value1 == 0 + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); + oop31 = (value1 == 0 ? falseObject() : trueObject()); - goto l23; + goto l19; } if (atomicType2 <= FFITypeSignedInt) { @@ -4815,39 +4895,39 @@ primitiveCallout(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } - oop4 = integerObjectOf(value1); - goto l23; + oop31 = integerObjectOf(value1); + goto l19; } - oop4 = (atomicType2 & 1 + oop31 = (atomicType2 & 1 ? (BytesPerWord == 8 ? signed64BitIntegerFor(intRet1) : signed32BitIntegerFor(intRet1)) : (BytesPerWord == 8 ? positive64BitIntegerFor(intRet1) : positive32BitIntegerFor(intRet1))); - goto l23; + goto l19; } - oop4 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) + oop31 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType2 & 1 ? signed64BitIntegerFor(intRet1) : positive64BitIntegerFor(intRet1)) : characterObjectOf(intRet1 & 0xFF)); - l23: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l19: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } - result2 = methodReturnValue(oop4); -l26: /* end ffiCalloutTo:SpecOnStack:in: */; + result2 = methodReturnValue(oop31); +l17: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { free(((calloutState1->stringArgs))[(calloutState1->stringArgIndex = ((calloutState1->stringArgIndex)) - 1)]); } -l6: /* end ffiCall:ArgArrayOrNil:NumArgs: */; +l26: /* end ffiCall:ArgArrayOrNil:NumArgs: */; # endif /* COGMTVM */ @@ -4864,8 +4944,8 @@ primitiveCalloutWithArgs(void) { sqInt address; sqInt address1; + sqInt address11; sqInt address2; - sqInt address3; sqInt addressPtr; sqInt addressPtr1; char *allocation; @@ -4910,8 +4990,8 @@ primitiveCalloutWithArgs(void) sqInt functionName1; sqInt i; sqInt i1; + sqInt i11; sqInt i2; - sqInt i3; usqLong intRet; usqLong intRet1; usqLong mask; @@ -4922,17 +5002,17 @@ primitiveCalloutWithArgs(void) sqInt oop; sqInt oop1; sqInt oop11; - sqInt oop12; sqInt oop2; sqInt oop21; sqInt oop3; + sqInt oop31; sqInt oop4; void *pointer; void *pointer1; - long *ptr; - long *ptr1; - sqInt *ptr2; - sqInt *ptr3; + sqIntptr_t *ptr; + sqInt *ptr1; + sqInt *ptr11; + sqIntptr_t *ptr2; sqInt requiredStackSize; sqInt requiredStackSize1; sqInt result; @@ -4949,14 +5029,14 @@ primitiveCalloutWithArgs(void) sqInt retryCount; sqInt retType; sqInt retType1; - int shift; - int shift1; + sqInt shift; + sqInt shift1; sqInt specLiteral; sqInt specLiteral1; sqInt specLiteral11; sqInt specLiteral2; - int stackSize; - int stackSize1; + sqInt stackSize; + sqInt stackSize1; sqInt strLen; sqInt strLen1; sqInt strOop; @@ -4994,12 +5074,12 @@ primitiveCalloutWithArgs(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { result = ffiFail(FFIErrorNotFunction); - goto l3; + goto l13; } flags = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } /* begin ffiLoadCalloutAddress: */ @@ -5007,16 +5087,16 @@ primitiveCalloutWithArgs(void) addressPtr = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr)) && ((byteSizeOf(addressPtr)) == (sizeof(sqInt))))) { - address2 = ffiFail(FFIErrorBadAddress); - goto l7; + address1 = ffiFail(FFIErrorBadAddress); + goto l3; } - address2 = fetchPointerofObject(0, addressPtr); - l7: /* end ffiContentsOfHandle:errCode: */; + address1 = fetchPointerofObject(0, addressPtr); + l3: /* end ffiContentsOfHandle:errCode: */; if (failed()) { address = 0; - goto l8; + goto l4; } - if (address2 == 0) { + if (address1 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { @@ -5024,21 +5104,21 @@ primitiveCalloutWithArgs(void) } if ((slotSizeOf(externalFunction)) < 5) { address = ffiFail(FFIErrorNoModule); - goto l8; + goto l4; } - address2 = ffiLoadCalloutAddressFrom(externalFunction); + address1 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { address = 0; - goto l8; + goto l4; } ptr = firstIndexableField(addressPtr); - ptr[0] = address2; + ptr[0] = address1; } - address = address2; - l8: /* end ffiLoadCalloutAddress: */; + address = address1; + l4: /* end ffiLoadCalloutAddress: */; if (failed()) { result = 0; - goto l3; + goto l13; } /* must be array of arg types */ @@ -5046,14 +5126,14 @@ primitiveCalloutWithArgs(void) if (!((isArray(argTypeArray)) && ((slotSizeOf(argTypeArray)) == (nArgs + 1)))) { result = ffiFail(FFIErrorBadArgs); - goto l3; + goto l13; } # if COGMTVM if (!(((flags & FFICallTypesMask) == FFICallTypeCDecl) || ((flags & FFICallTypesMask) == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # else /* COGMTVM */ @@ -5062,7 +5142,7 @@ primitiveCalloutWithArgs(void) if (!((flags == FFICallTypeCDecl) || (flags == FFICallTypeApi))) { result = ffiFail(FFIErrorCallType); - goto l3; + goto l13; } # endif /* COGMTVM */ @@ -5074,7 +5154,7 @@ primitiveCalloutWithArgs(void) result = primitiveFailFor((argArray == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l3; + goto l13; } stackSize = (requiredStackSize < 0 ? DefaultMaxStackSize @@ -5087,7 +5167,7 @@ primitiveCalloutWithArgs(void) argClass = fetchPointerofObject(1, argType); if (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) { result = ffiFail(err); - goto l3; + goto l13; } allocation = alloca(((stackSize + ((calloutState->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -5106,18 +5186,18 @@ primitiveCalloutWithArgs(void) pointer = (calloutState->limit); if (((calloutState->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState->integerRegisters))[(calloutState->integerRegisterIndex)] = (((sqInt)pointer)); - (calloutState->integerRegisterIndex = ((calloutState->integerRegisterIndex)) + 1); + (calloutState->floatRegisterIndex) = ((calloutState->integerRegisterIndex) = ((calloutState->integerRegisterIndex)) + 1); } else { if ((((calloutState->currentArg)) + WordSize) > ((calloutState->limit))) { err = FFIErrorCallFrameTooBig; - goto l1; + goto l2; } longAtput((calloutState->currentArg), pointer); (calloutState->currentArg = ((calloutState->currentArg)) + WordSize); } err = 0; - l1: /* end ffiPushPointer:in: */; + l2: /* end ffiPushPointer:in: */; if (err != 0) { /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { @@ -5127,13 +5207,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } for (i = 1; i <= nArgs; i += 1) { @@ -5153,13 +5233,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err == (-PrimErrObjectMayMove)) { result = PrimErrObjectMayMove; - goto l3; + goto l13; } # endif /* COGMTVM */ result = ffiFail(err); - goto l3; + goto l13; } } assert(!(failed())); @@ -5167,11 +5247,11 @@ primitiveCalloutWithArgs(void) if (ffiLogEnabled) { functionName = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName))) { - goto l2; + goto l1; } ffiLogCallOfLength(firstIndexableField(functionName), byteSizeOf(functionName)); } - l2: /* end ffiLogCallout: */; + l1: /* end ffiLogCallout: */; if ((requiredStackSize < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize = ((calloutState->currentArg)) - ((calloutState->argVector)); @@ -5189,7 +5269,7 @@ primitiveCalloutWithArgs(void) if ((0 + (cStackAlignment())) > 0) { setsp((calloutState->argVector)); } - if (((calloutState->floatRegisterIndex)) > 0) { + if (((calloutState->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState->floatRegisters))[0], ((calloutState->floatRegisters))[1], ((calloutState->floatRegisters))[2], ((calloutState->floatRegisters))[3], ((calloutState->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -5197,16 +5277,16 @@ primitiveCalloutWithArgs(void) atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType == FFITypeSingleFloat) { - floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + floatRet = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } } else { - intRet = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); + intRet = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address))), ((calloutState->integerRegisters))[0], ((calloutState->integerRegisters))[1], ((calloutState->integerRegisters))[2], ((calloutState->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState->callFlags))) { setsp((calloutState->argVector)); @@ -5244,7 +5324,7 @@ primitiveCalloutWithArgs(void) cPointer = ((usqInt) intRet); if (cPointer == null) { oop3 = methodReturnValue(nilObject()); - goto l16; + goto l10; } cString = ((char *) cPointer); strLen = 0; @@ -5253,17 +5333,17 @@ primitiveCalloutWithArgs(void) } strOop = instantiateClassindexableSize(classString(), strLen); strPtr = firstIndexableField(strOop); - for (i2 = 0; i2 < strLen; i2 += 1) { - strPtr[i2] = (cString[i2]); + for (i1 = 0; i1 < strLen; i1 += 1) { + strPtr[i1] = (cString[i1]); } oop3 = methodReturnValue(strOop); - goto l16; + goto l10; } #if SPURVM oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -5279,8 +5359,8 @@ primitiveCalloutWithArgs(void) #else /* SPURVM */ pushRemappableOop(retType); oop2 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(classExternalData(), 0); @@ -5297,7 +5377,7 @@ primitiveCalloutWithArgs(void) ; storePointerofObjectwithValue(1, retOop1, retType); oop3 = methodReturnValue(retOop1); - goto l16; + goto l10; } classOop = (((calloutState->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -5312,8 +5392,8 @@ primitiveCalloutWithArgs(void) retClass1 = popRemappableOop() #endif /* SPURVM */ ; - ptr2 = firstIndexableField(oop2); - ptr2[0] = (((sqInt) intRet)); + ptr1 = firstIndexableField(oop2); + ptr1[0] = (((sqInt) intRet)); #if SPURVM retOop1 = instantiateClassindexableSize(retClass1, 0); @@ -5326,7 +5406,7 @@ primitiveCalloutWithArgs(void) ; storePointerofObjectwithValue(0, retOop1, oop2); oop3 = methodReturnValue(retOop1); - l16: /* end ffiReturnPointer:ofType:in: */; + l10: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -5339,22 +5419,22 @@ primitiveCalloutWithArgs(void) retOop = instantiateClassindexableSize(retClass, 0); #if SPURVM - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop); - oop11 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); + oop1 = instantiateClassindexableSize(classByteArray(), (calloutState->structReturnSize)); retOop = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState->structReturnSize)) + memcpy(firstIndexableField(oop1), (returnStructInRegisters((calloutState->structReturnSize)) ? (&intRet) : (calloutState->limit)), (calloutState->structReturnSize)); - storePointerofObjectwithValue(0, retOop, oop11); + storePointerofObjectwithValue(0, retOop, oop1); oop3 = methodReturnValue(retOop); } result1 = oop3; - goto l18; + goto l12; } if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { oop3 = floatObjectOf(floatRet); @@ -5368,11 +5448,11 @@ primitiveCalloutWithArgs(void) byteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask; value = (byteSize == (sizeof(intRet)) ? intRet - : intRet & ((1U << (byteSize * 8)) - 1)); + : intRet & (((((unsigned long long)1)) << (byteSize * 8)) - 1)); oop3 = (value == 0 ? falseObject() : trueObject()); - goto l15; + goto l6; } if (atomicType <= FFITypeSignedInt) { @@ -5388,15 +5468,15 @@ primitiveCalloutWithArgs(void) && (atomicType >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType) >> 1) * 8); - value = intRet & (((((unsigned long)1)) << shift) - 1); + value = intRet & (((((unsigned long long)1)) << shift) - 1); if (atomicType & 1) { /* make the guy signed */ - mask = (((unsigned long)1)) << (shift - 1); + mask = (((unsigned long long)1)) << (shift - 1); value = (value & (mask - 1)) - (value & mask); } oop3 = integerObjectOf(value); - goto l15; + goto l6; } oop3 = (atomicType & 1 ? (BytesPerWord == 8 @@ -5405,23 +5485,23 @@ primitiveCalloutWithArgs(void) : (BytesPerWord == 8 ? positive64BitIntegerFor(intRet) : positive32BitIntegerFor(intRet))); - goto l15; + goto l6; } oop3 = ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType & 1 ? signed64BitIntegerFor(intRet) : positive64BitIntegerFor(intRet)) : characterObjectOf(intRet & 0xFF)); - l15: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l6: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } result1 = methodReturnValue(oop3); - l18: /* end ffiCalloutTo:SpecOnStack:in: */; + l12: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState->stringArgIndex)) > 0) { free(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]); } result = result1; - l3: /* end ffiCall:ArgArrayOrNil:NumArgs: */; + l13: /* end ffiCall:ArgArrayOrNil:NumArgs: */; if (!((result == PrimErrObjectMayMove) && (((retryCount += 1)) <= (nArgs + 1)))) break; tenuringIncrementalGC(); @@ -5438,12 +5518,12 @@ primitiveCalloutWithArgs(void) /* begin ffiCall:ArgArrayOrNil:NumArgs: */ if (!(isKindOfClass(externalFunction, classExternalFunction()))) { ffiFail(FFIErrorNotFunction); - goto l6; + goto l26; } flags1 = fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction); if (failed()) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } /* begin ffiLoadCalloutAddress: */ @@ -5451,37 +5531,37 @@ primitiveCalloutWithArgs(void) addressPtr1 = fetchPointerofObject(0, externalFunction); if (!((isBytes(addressPtr1)) && ((byteSizeOf(addressPtr1)) == (sizeof(sqInt))))) { - address3 = ffiFail(FFIErrorBadAddress); - goto l9; + address11 = ffiFail(FFIErrorBadAddress); + goto l20; } - address3 = fetchPointerofObject(0, addressPtr1); -l9: /* end ffiContentsOfHandle:errCode: */; + address11 = fetchPointerofObject(0, addressPtr1); +l20: /* end ffiContentsOfHandle:errCode: */; if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - if (address3 == 0) { + if (address11 == 0) { /* Go look it up in the module */ if (externalFunctionInstSize > ExternalFunctionStackSizeIndex) { storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, integerObjectOf(-1)); } if ((slotSizeOf(externalFunction)) < 5) { - address1 = ffiFail(FFIErrorNoModule); - goto l10; + address2 = ffiFail(FFIErrorNoModule); + goto l15; } - address3 = ffiLoadCalloutAddressFrom(externalFunction); + address11 = ffiLoadCalloutAddressFrom(externalFunction); if (failed()) { - address1 = 0; - goto l10; + address2 = 0; + goto l15; } - ptr1 = firstIndexableField(addressPtr1); - ptr1[0] = address3; + ptr2 = firstIndexableField(addressPtr1); + ptr2[0] = address11; } - address1 = address3; -l10: /* end ffiLoadCalloutAddress: */; + address2 = address11; +l15: /* end ffiLoadCalloutAddress: */; if (failed()) { - goto l6; + goto l26; } /* must be array of arg types */ @@ -5489,14 +5569,14 @@ primitiveCalloutWithArgs(void) if (!((isArray(argTypeArray1)) && ((slotSizeOf(argTypeArray1)) == (nArgs + 1)))) { ffiFail(FFIErrorBadArgs); - goto l6; + goto l26; } # if COGMTVM if (!(((flags1 & FFICallTypesMask) == FFICallTypeCDecl) || ((flags1 & FFICallTypesMask) == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # else /* COGMTVM */ @@ -5505,7 +5585,7 @@ primitiveCalloutWithArgs(void) if (!((flags1 == FFICallTypeCDecl) || (flags1 == FFICallTypeApi))) { ffiFail(FFIErrorCallType); - goto l6; + goto l26; } # endif /* COGMTVM */ @@ -5517,7 +5597,7 @@ primitiveCalloutWithArgs(void) primitiveFailFor((argArray == null ? PrimErrBadMethod : PrimErrBadReceiver)); - goto l6; + goto l26; } stackSize1 = (requiredStackSize1 < 0 ? DefaultMaxStackSize @@ -5530,7 +5610,7 @@ primitiveCalloutWithArgs(void) argClass1 = fetchPointerofObject(1, argType1); if (((err1 = ffiCheckReturnWithin(argSpec1, argClass1, calloutState1))) != 0) { ffiFail(err1); - goto l6; + goto l26; } allocation1 = alloca(((stackSize1 + ((calloutState1->structReturnSize)))) + (cStackAlignment())); if (allocaLiesSoUseGetsp()) { @@ -5549,18 +5629,18 @@ primitiveCalloutWithArgs(void) pointer1 = (calloutState1->limit); if (((calloutState1->integerRegisterIndex)) < NumIntRegArgs) { ((calloutState1->integerRegisters))[(calloutState1->integerRegisterIndex)] = (((sqInt)pointer1)); - (calloutState1->integerRegisterIndex = ((calloutState1->integerRegisterIndex)) + 1); + (calloutState1->floatRegisterIndex) = ((calloutState1->integerRegisterIndex) = ((calloutState1->integerRegisterIndex)) + 1); } else { if ((((calloutState1->currentArg)) + WordSize) > ((calloutState1->limit))) { err1 = FFIErrorCallFrameTooBig; - goto l4; + goto l24; } longAtput((calloutState1->currentArg), pointer1); (calloutState1->currentArg = ((calloutState1->currentArg)) + WordSize); } err1 = 0; - l4: /* end ffiPushPointer:in: */; + l24: /* end ffiPushPointer:in: */; if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -5569,23 +5649,23 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } - for (i1 = 1; i1 <= nArgs; i1 += 1) { - argType1 = fetchPointerofObject(i1, argTypeArray1); + for (i2 = 1; i2 <= nArgs; i2 += 1) { + argType1 = fetchPointerofObject(i2, argTypeArray1); argSpec1 = fetchPointerofObject(0, argType1); argClass1 = fetchPointerofObject(1, argType1); - oop1 = (argArray == null - ? stackValue(nArgs - i1) - : fetchPointerofObject(i1 - 1, argArray)); - err1 = ffiArgumentSpecClassin(oop1, argSpec1, argClass1, calloutState1); + oop4 = (argArray == null + ? stackValue(nArgs - i2) + : fetchPointerofObject(i2 - 1, argArray)); + err1 = ffiArgumentSpecClassin(oop4, argSpec1, argClass1, calloutState1); if (err1 != 0) { /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { @@ -5594,13 +5674,13 @@ primitiveCalloutWithArgs(void) # if COGMTVM if (err1 == (-PrimErrObjectMayMove)) { - goto l6; + goto l26; } # endif /* COGMTVM */ ffiFail(err1); - goto l6; + goto l26; } } assert(!(failed())); @@ -5608,11 +5688,11 @@ primitiveCalloutWithArgs(void) if (ffiLogEnabled) { functionName1 = fetchPointerofObject(externalFunctionInstSize, externalFunction); if (!(isBytes(functionName1))) { - goto l5; + goto l16; } ffiLogCallOfLength(firstIndexableField(functionName1), byteSizeOf(functionName1)); } -l5: /* end ffiLogCallout: */; +l16: /* end ffiLogCallout: */; if ((requiredStackSize1 < 0) && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) { stackSize1 = ((calloutState1->currentArg)) - ((calloutState1->argVector)); @@ -5630,7 +5710,7 @@ primitiveCalloutWithArgs(void) if ((0 + (cStackAlignment())) > 0) { setsp((calloutState1->argVector)); } - if (((calloutState1->floatRegisterIndex)) > 0) { + if (((calloutState1->floatRegisterSignature)) > 0) { loadFloatRegs(((calloutState1->floatRegisters))[0], ((calloutState1->floatRegisters))[1], ((calloutState1->floatRegisters))[2], ((calloutState1->floatRegisters))[3], ((calloutState1->floatRegisters))[4]); } /* begin atomicTypeOf: */ @@ -5638,16 +5718,16 @@ primitiveCalloutWithArgs(void) atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift; if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { if (atomicType2 == FFITypeSingleFloat) { - floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((float (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } else { /* atomicType = FFITypeDoubleFloat */ - floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + floatRet1 = dispatchFunctionPointerwithwithwithwith(((double (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } } else { - intRet1 = dispatchFunctionPointerwithwithwithwith(((usqLong (*)(long, long, long, long)) (((void *) address1))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); + intRet1 = dispatchFunctionPointerwithwithwithwith(((usqIntptr_t (*)(sqIntptr_t, sqIntptr_t, sqIntptr_t, sqIntptr_t)) (((void *) address2))), ((calloutState1->integerRegisters))[0], ((calloutState1->integerRegisters))[1], ((calloutState1->integerRegisters))[2], ((calloutState1->integerRegisters))[3]); } if (isCalleePopsConvention((calloutState1->callFlags))) { setsp((calloutState1->argVector)); @@ -5684,8 +5764,8 @@ primitiveCalloutWithArgs(void) /* begin ffiReturnCStringFrom: */ cPointer1 = ((usqInt) intRet1); if (cPointer1 == null) { - oop4 = methodReturnValue(nilObject()); - goto l24; + oop31 = methodReturnValue(nilObject()); + goto l25; } cString1 = ((char *) cPointer1); strLen1 = 0; @@ -5694,17 +5774,17 @@ primitiveCalloutWithArgs(void) } strOop1 = instantiateClassindexableSize(classString(), strLen1); strPtr1 = firstIndexableField(strOop1); - for (i3 = 0; i3 < strLen1; i3 += 1) { - strPtr1[i3] = (cString1[i3]); + for (i11 = 0; i11 < strLen1; i11 += 1) { + strPtr1[i11] = (cString1[i11]); } - oop4 = methodReturnValue(strOop1); - goto l24; + oop31 = methodReturnValue(strOop1); + goto l25; } #if SPURVM oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -5720,8 +5800,8 @@ primitiveCalloutWithArgs(void) #else /* SPURVM */ pushRemappableOop(retType1); oop21 = instantiateClassindexableSize(classExternalAddress(), BytesPerWord); - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(classExternalData(), 0); @@ -5737,8 +5817,8 @@ primitiveCalloutWithArgs(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(1, retOop11, retType1); - oop4 = methodReturnValue(retOop11); - goto l24; + oop31 = methodReturnValue(retOop11); + goto l25; } classOop1 = (((calloutState1->ffiRetHeader)) & FFIFlagStructure ? classByteArray() @@ -5753,8 +5833,8 @@ primitiveCalloutWithArgs(void) retClass11 = popRemappableOop() #endif /* SPURVM */ ; - ptr3 = firstIndexableField(oop21); - ptr3[0] = (((sqInt) intRet1)); + ptr11 = firstIndexableField(oop21); + ptr11[0] = (((sqInt) intRet1)); #if SPURVM retOop11 = instantiateClassindexableSize(retClass11, 0); @@ -5766,8 +5846,8 @@ primitiveCalloutWithArgs(void) #endif /* SPURVM */ ; storePointerofObjectwithValue(0, retOop11, oop21); - oop4 = methodReturnValue(retOop11); - l24: /* end ffiReturnPointer:ofType:in: */; + oop31 = methodReturnValue(retOop11); + l25: /* end ffiReturnPointer:ofType:in: */; } else { /* begin ffiReturnStruct:ofType:in: */ @@ -5780,25 +5860,25 @@ primitiveCalloutWithArgs(void) retOop2 = instantiateClassindexableSize(retClass2, 0); #if SPURVM - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); #else /* SPURVM */ pushRemappableOop(retOop2); - oop12 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); + oop11 = instantiateClassindexableSize(classByteArray(), (calloutState1->structReturnSize)); retOop2 = popRemappableOop() #endif /* SPURVM */ ; - memcpy(firstIndexableField(oop12), (returnStructInRegisters((calloutState1->structReturnSize)) + memcpy(firstIndexableField(oop11), (returnStructInRegisters((calloutState1->structReturnSize)) ? (&intRet1) : (calloutState1->limit)), (calloutState1->structReturnSize)); - storePointerofObjectwithValue(0, retOop2, oop12); - oop4 = methodReturnValue(retOop2); + storePointerofObjectwithValue(0, retOop2, oop11); + oop31 = methodReturnValue(retOop2); } - result2 = oop4; - goto l26; + result2 = oop31; + goto l17; } if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) { - oop4 = floatObjectOf(floatRet1); + oop31 = floatObjectOf(floatRet1); } else { /* begin ffiCreateIntegralResultOop:ofAtomicType:in: */ @@ -5809,11 +5889,11 @@ primitiveCalloutWithArgs(void) byteSize1 = ((calloutState1->ffiRetHeader)) & FFIStructSizeMask; value1 = (byteSize1 == (sizeof(intRet1)) ? intRet1 - : intRet1 & ((1U << (byteSize1 * 8)) - 1)); - oop4 = (value1 == 0 + : intRet1 & (((((unsigned long long)1)) << (byteSize1 * 8)) - 1)); + oop31 = (value1 == 0 ? falseObject() : trueObject()); - goto l23; + goto l19; } if (atomicType2 <= FFITypeSignedInt) { @@ -5829,39 +5909,39 @@ primitiveCalloutWithArgs(void) && (atomicType2 >= FFITypeUnsignedInt) ? 32 : (((usqInt) atomicType2) >> 1) * 8); - value1 = intRet1 & (((((unsigned long)1)) << shift1) - 1); + value1 = intRet1 & (((((unsigned long long)1)) << shift1) - 1); if (atomicType2 & 1) { /* make the guy signed */ - mask1 = (((unsigned long)1)) << (shift1 - 1); + mask1 = (((unsigned long long)1)) << (shift1 - 1); value1 = (value1 & (mask1 - 1)) - (value1 & mask1); } - oop4 = integerObjectOf(value1); - goto l23; + oop31 = integerObjectOf(value1); + goto l19; } - oop4 = (atomicType2 & 1 + oop31 = (atomicType2 & 1 ? (BytesPerWord == 8 ? signed64BitIntegerFor(intRet1) : signed32BitIntegerFor(intRet1)) : (BytesPerWord == 8 ? positive64BitIntegerFor(intRet1) : positive32BitIntegerFor(intRet1))); - goto l23; + goto l19; } - oop4 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) + oop31 = ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1) ? (atomicType2 & 1 ? signed64BitIntegerFor(intRet1) : positive64BitIntegerFor(intRet1)) : characterObjectOf(intRet1 & 0xFF)); - l23: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; + l19: /* end ffiCreateIntegralResultOop:ofAtomicType:in: */; } - result2 = methodReturnValue(oop4); -l26: /* end ffiCalloutTo:SpecOnStack:in: */; + result2 = methodReturnValue(oop31); +l17: /* end ffiCalloutTo:SpecOnStack:in: */; /* begin cleanupCalloutState: */ while (((calloutState1->stringArgIndex)) > 0) { free(((calloutState1->stringArgs))[(calloutState1->stringArgIndex = ((calloutState1->stringArgIndex)) - 1)]); } -l6: /* end ffiCall:ArgArrayOrNil:NumArgs: */; +l26: /* end ffiCall:ArgArrayOrNil:NumArgs: */; # endif /* COGMTVM */ @@ -5903,9 +5983,7 @@ primitiveCreateManualSurface(void) if (result < 0) { return primitiveFail(); } - result = (BytesPerWord == 8 - ? signed64BitIntegerFor(result) - : signed32BitIntegerFor(result)); + result = signed32BitIntegerFor(result); return popthenPush(6, result); } @@ -5944,7 +6022,7 @@ primitiveFFIAllocate(void) sqInt addr; sqInt byteSize; sqInt oop; - long *ptr; + sqIntptr_t *ptr; byteSize = stackIntegerValue(0); if (failed()) { @@ -5954,7 +6032,7 @@ primitiveFFIAllocate(void) if (addr == 0) { return primitiveFail(); } - oop = instantiateClassindexableSize(classExternalAddress(), sizeof(long)); + oop = instantiateClassindexableSize(classExternalAddress(), sizeof(sqIntptr_t)); ptr = firstIndexableField(oop); ptr[0] = addr; return popthenPush(2, oop); @@ -6085,13 +6163,13 @@ primitiveFFIFloatAtPut(void) EXPORT(sqInt) primitiveFFIFree(void) { - long addr; + sqIntptr_t addr; sqInt oop; - long *ptr; + sqIntptr_t *ptr; oop = stackObjectValue(0); if (!(((fetchClassOf(oop)) == (classExternalAddress())) - && ((byteSizeOf(oop)) == (sizeof(long))))) { + && ((byteSizeOf(oop)) == (sizeof(sqIntptr_t))))) { return primitiveFail(); } ptr = firstIndexableField(oop); @@ -6099,7 +6177,7 @@ primitiveFFIFree(void) /* Don't you dare to free Squeak's memory! */ addr = ptr[0]; if ((addr == 0) - || ((((((unsigned long)addr)) & ((sizeof(long)) - 1)) != 0) + || ((((((usqIntptr_t)addr)) & ((sizeof(sqIntptr_t)) - 1)) != 0) || (isInMemory(addr)))) { return primitiveFail(); } @@ -6175,7 +6253,7 @@ primitiveFFIIntegerAt(void) if (isSigned) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = integerObjectOf(value); @@ -6187,7 +6265,7 @@ primitiveFFIIntegerAt(void) if (byteSize < 8) { /* sign extend value */ - mask = 1U << ((byteSize * 8) - 1); + mask = (((unsigned long long)1)) << ((byteSize * 8) - 1); value = (value & (mask - 1)) - (value & mask); } valueOop = signed64BitIntegerFor(value); @@ -6411,7 +6489,7 @@ primitiveLogCallsTo(void) EXPORT(sqInt) primitiveSetManualSurfacePointer(void) { - unsigned long ptr; + usqIntptr_t ptr; sqInt result; sqInt surfaceID; @@ -6451,7 +6529,8 @@ registerArgsSlop(void) static sqInt returnStructInRegisters(sqInt returnStructSize) { - return returnStructSize <= WordSize; + return (returnStructSize <= WordSize) + && ((returnStructSize & (returnStructSize - 1)) == 0); } @@ -6574,7 +6653,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c b/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c index 2ed869b6af..20db01dc36 100644 --- a/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c +++ b/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c @@ -1,5 +1,5 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1961 uuid: e0793c3c-8f65-4263-9c21-811c44976606 + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.54 uuid: 01915e38-391e-49ba-9114-6e60dd7bb1ce */ @@ -71,7 +71,7 @@ static void dupToStdIn(sqInt anSQFileDataStructure); static void dupToStdOut(sqInt anSQFileDataStructure); static sqInt fileDescriptorFrom(sqInt aSQFileByteArray); static FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray); -static usqInt fileRecordSize(void); +static usqIntptr_t fileRecordSize(void); static SQFile * fileValueOf(sqInt anSQFileRecord); static char ** fixPointersInArrayOfStringswithOffsets(sqInt flattenedStrings, sqInt offsets); static sqInt forkAndExecInDirectory(sqInt useSignalHandler); @@ -226,11 +226,11 @@ static sqInt sigStopNumber(void); static sqInt sigTermNumber(void); static sqInt sigUsr1Number(void); static sqInt sigUsr2Number(void); -static usqInt sizeOfInt(void); -static usqInt sizeOfPointer(void); +static usqIntptr_t sizeOfInt(void); +static usqIntptr_t sizeOfPointer(void); static sqInt sizeOfSession(void); static int socketDescriptorFrom(sqInt sqSocketOop); -static usqInt socketRecordSize(void); +static usqIntptr_t socketRecordSize(void); static SocketPtr socketValueOf(sqInt anSQSocketRecord); static sqInt stringFromCString(const char *aCString); static char * transientCStringFromString(sqInt aString); @@ -578,7 +578,7 @@ fileHandleFrom(sqInt sqFileStructByteArray) /* Return the size of a Smalltalk file record in bytes. */ /* OSProcessPlugin>>#fileRecordSize */ -static usqInt +static usqIntptr_t fileRecordSize(void) { return sizeof(SQFile); @@ -2205,7 +2205,7 @@ primitiveGetSession(void) void *charArray1; sqInt i; unsigned char *sessionByteArrayPointer; - unsigned long sessionIDSize; + usqIntptr_t sessionIDSize; sqInt sessionOop; SESSIONIDENTIFIERTYPE thisSessionID; @@ -4650,7 +4650,7 @@ sigUsr2Number(void) /* Size in bytes of an integer, for this C compiler on this machine. */ /* OSProcessPlugin>>#sizeOfInt */ -static usqInt +static usqIntptr_t sizeOfInt(void) { return sizeof(int); @@ -4660,7 +4660,7 @@ sizeOfInt(void) /* Size in bytes of a void pointer, for this C compiler on this machine. */ /* OSProcessPlugin>>#sizeOfPointer */ -static usqInt +static usqIntptr_t sizeOfPointer(void) { return sizeof(void *); @@ -4710,7 +4710,7 @@ socketDescriptorFrom(sqInt sqSocketOop) /* Answer the size of a SQSocket data structure in bytes. */ /* OSProcessPlugin>>#socketRecordSize */ -static usqInt +static usqIntptr_t socketRecordSize(void) { return sizeof(SQSocket); diff --git a/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c b/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c index 8092bd94ed..2e0056154f 100644 --- a/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c +++ b/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1962 uuid: acd846c2-7b7a-418a-9bf7-dc40c88aadff + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - VMProfileLinuxSupportPlugin VMMaker.oscog-eem.1962 uuid: acd846c2-7b7a-418a-9bf7-dc40c88aadff + VMProfileLinuxSupportPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.1962 uuid: acd846c2-7b7a-418a-9bf7-dc40c88aadff " __DATE__ ; +static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -53,7 +53,7 @@ static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.1962 /*** Function Prototypes ***/ static int countnummodules(struct dl_phdr_info *info, size_t size, void *ignored); EXPORT(const char*) getModuleName(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveDLSymInLibrary(void); EXPORT(sqInt) primitiveExecutableModules(void); EXPORT(sqInt) primitiveInterpretAddress(void); @@ -105,9 +105,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.1962 (i)" + "VMProfileLinuxSupportPlugin VMMaker.oscog-nice.1982 (i)" #else - "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.1962 (e)" + "VMProfileLinuxSupportPlugin VMMaker.oscog-nice.1982 (e)" #endif ; static sqInt numModules; @@ -137,7 +137,7 @@ getModuleName(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -193,8 +193,8 @@ primitiveDLSymInLibrary(void) return primitiveFailFor(PrimErrNotFound); } return methodReturnValue((BytesPerWord == 8 - ? positive64BitIntegerFor(((unsigned long)addr)) - : positive32BitIntegerFor(((unsigned long)addr)))); + ? positive64BitIntegerFor(((usqIntptr_t)addr)) + : positive32BitIntegerFor(((usqIntptr_t)addr)))); } @@ -238,8 +238,8 @@ primitiveInterpretAddress(void) extern void interpret(); return methodReturnValue((BytesPerWord == 8 - ? positive64BitIntegerFor(((unsigned long)interpret)) - : positive32BitIntegerFor(((unsigned long)interpret)))); + ? positive64BitIntegerFor(((usqIntptr_t)interpret)) + : positive32BitIntegerFor(((usqIntptr_t)interpret)))); } /* VMProfileLinuxSupportPlugin>>#reap:module:names: */ diff --git a/src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c b/src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c index 29d56ae959..9e7335f32f 100644 --- a/src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c +++ b/src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + VMPluginCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 from - VMProfileMacSupportPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 + VMProfileMacSupportPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ -static char __buildInfo[] = "VMProfileMacSupportPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; +static char __buildInfo[] = "VMProfileMacSupportPlugin VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 " __DATE__ ; @@ -41,11 +41,11 @@ static char __buildInfo[] = "VMProfileMacSupportPlugin VMMaker.oscog-eem.1975 uu /*** Function Prototypes ***/ EXPORT(const char*) getModuleName(void); -static sqInt positiveMachineIntegerFor(unsigned long value); +static sqInt positiveMachineIntegerFor(usqIntptr_t value); EXPORT(sqInt) primitiveDLSym(void); EXPORT(sqInt) primitiveExecutableModulesAndOffsets(void); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); -static sqInt signedMachineIntegerFor(unsigned long value); +static sqInt signedMachineIntegerFor(sqIntptr_t value); /*** Variables ***/ @@ -101,9 +101,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "VMProfileMacSupportPlugin VMMaker.oscog-eem.1975 (i)" + "VMProfileMacSupportPlugin VMMaker.oscog-nice.1982 (i)" #else - "VMProfileMacSupportPlugin VMMaker.oscog-eem.1975 (e)" + "VMProfileMacSupportPlugin VMMaker.oscog-nice.1982 (e)" #endif ; @@ -123,7 +123,7 @@ getModuleName(void) /* InterpreterPlugin>>#positiveMachineIntegerFor: */ static sqInt -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { return (BytesPerWord == 8 ? positive64BitIntegerFor(value) @@ -160,8 +160,8 @@ primitiveDLSym(void) return methodReturnValue((addr == 0 ? nilObject() : (BytesPerWord == 8 - ? positive64BitIntegerFor(((unsigned long)addr)) - : positive32BitIntegerFor(((unsigned long)addr))))); + ? positive64BitIntegerFor(((usqIntptr_t)addr)) + : positive32BitIntegerFor(((usqIntptr_t)addr))))); } @@ -182,9 +182,9 @@ primitiveExecutableModulesAndOffsets(void) sqInt resultObj; const struct section *s; const struct section_64 *s64; - unsigned long size; - unsigned long slide; - unsigned long start; + usqIntptr_t size; + usqIntptr_t slide; + usqIntptr_t start; sqInt valueObj; @@ -313,7 +313,7 @@ setInterpreter(struct VirtualMachine*anInterpreter) /* InterpreterPlugin>>#signedMachineIntegerFor: */ static sqInt -signedMachineIntegerFor(unsigned long value) +signedMachineIntegerFor(sqIntptr_t value) { return (BytesPerWord == 8 ? signed64BitIntegerFor(value) diff --git a/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c b/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c index b5d45e83a5..99494842a6 100644 --- a/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c +++ b/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.1851 uuid: a2b37448-8ea6-480e-aa07-e99d6de1744a + VMPluginCodeGenerator VMMaker.oscog-nice.1990 uuid: c6fc0dfe-e6b3-4eff-bd4c-ed591f81125e from - Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.53 uuid: 19679cb9-5840-4a5d-876f-a506bf70a1b6 + Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-nice.55 uuid: 909cbe51-b389-4e44-983b-c308b8be3812 */ -static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.53 uuid: 19679cb9-5840-4a5d-876f-a506bf70a1b6 " __DATE__ ; +static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-nice.55 uuid: 909cbe51-b389-4e44-983b-c308b8be3812 " __DATE__ ; /* D T Lewis - Win32OSProcessPlugin.c translated from class Win32OSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */ @@ -56,7 +56,7 @@ static HANDLE createThreadMutex(void); static char * cStringFromString(sqInt aString); static HANDLE exitThreadMutexHandle(void); static FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray); -static usqInt fileRecordSize(void); +static usqIntptr_t fileRecordSize(void); static SQFile * fileValueOf(sqInt anSQFileRecord); static char ** fixPointersInArrayOfStringswithOffsets(sqInt flattenedStrings, sqInt offsets); EXPORT(const char*) getModuleName(void); @@ -122,11 +122,11 @@ static sqInt securityHeurisitic(void); static SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter); EXPORT(sqInt) shutdownModule(void); -static usqInt sizeOfInt(void); -static usqInt sizeOfPointer(void); +static usqIntptr_t sizeOfInt(void); +static usqIntptr_t sizeOfPointer(void); static sqInt sizeOfSession(void); static int socketDescriptorFrom(sqInt sqSocketOop); -static usqInt socketRecordSize(void); +static usqIntptr_t socketRecordSize(void); static SocketPtr socketValueOf(sqInt anSQSocketRecord); static sqInt startHandlerThreadForAnycountsignalingSemaphoreAt(HANDLE *handleArrayPointer, sqInt arraySize, sqInt semaphoreIndex); static HANDLE stdErrHandle(void); @@ -217,9 +217,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.53 (i)" + "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-nice.55 (i)" #else - "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.53 (e)" + "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-nice.55 (e)" #endif ; static int osprocessSandboxSecurity; @@ -335,7 +335,7 @@ fileHandleFrom(sqInt sqFileStructByteArray) /* Return the size of a Smalltalk file record in bytes. */ /* OSProcessPlugin>>#fileRecordSize */ -static usqInt +static usqIntptr_t fileRecordSize(void) { return sizeof(SQFile); @@ -1074,7 +1074,7 @@ EXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void) { char *buffer; - unsigned long charSize; + usqIntptr_t charSize; DWORD cwdLen; sqInt cwdString; DWORD requiredLen; @@ -1264,7 +1264,7 @@ primitiveGetSession(void) void *charArray1; sqInt i; unsigned char *sessionByteArrayPointer; - unsigned long sessionIDSize; + usqIntptr_t sessionIDSize; sqInt sessionOop; SESSIONIDENTIFIERTYPE thisSessionID; @@ -1792,7 +1792,7 @@ primitiveSetWaitForAnyProcessExitThenSignalSemaphoreWithIndex(void) sqInt arraySize; static HANDLE handleArray[MAXIMUM_WAIT_OBJECTS]; sqInt handleArrayOop; - unsigned int *handleArrayOopPtr; + sqInt *handleArrayOopPtr; static HANDLE *handleArrayPtr; sqInt handleCount; sqInt idx; @@ -2125,7 +2125,7 @@ shutdownModule(void) /* Size in bytes of an integer, for this C compiler on this machine. */ /* OSProcessPlugin>>#sizeOfInt */ -static usqInt +static usqIntptr_t sizeOfInt(void) { return sizeof(int); @@ -2135,7 +2135,7 @@ sizeOfInt(void) /* Size in bytes of a void pointer, for this C compiler on this machine. */ /* OSProcessPlugin>>#sizeOfPointer */ -static usqInt +static usqIntptr_t sizeOfPointer(void) { return sizeof(void *); @@ -2185,7 +2185,7 @@ socketDescriptorFrom(sqInt sqSocketOop) /* Answer the size of a SQSocket data structure in bytes. */ /* OSProcessPlugin>>#socketRecordSize */ -static usqInt +static usqIntptr_t socketRecordSize(void) { return sizeof(SQSocket); diff --git a/src/vm/cogit.h b/src/vm/cogit.h index fd0fb7132c..9de9a0331d 100644 --- a/src/vm/cogit.h +++ b/src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ @@ -112,15 +112,15 @@ VM_EXPORT sqInt ceCannotResumeTrampoline; VM_EXPORT void (*ceCaptureCStackPointers)(void); VM_EXPORT sqInt ceCheckForInterruptTrampoline; VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void); -VM_EXPORT unsigned long (*ceGetFP)(void); -VM_EXPORT unsigned long (*ceGetSP)(void); +VM_EXPORT usqIntptr_t (*ceGetFP)(void); +VM_EXPORT usqIntptr_t (*ceGetSP)(void); VM_EXPORT sqInt ceReturnToInterpreterTrampoline; -VM_EXPORT unsigned long (*ceTryLockVMOwner)(void); +VM_EXPORT usqIntptr_t (*ceTryLockVMOwner)(void); VM_EXPORT void (*ceUnlockVMOwner)(void); VM_EXPORT sqInt cFramePointerInUse; VM_EXPORT sqInt cmEntryOffset; VM_EXPORT sqInt cmNoCheckEntryOffset; -VM_EXPORT unsigned long debugPrimCallStackOffset; +VM_EXPORT usqIntptr_t debugPrimCallStackOffset; VM_EXPORT sqInt missOffset; VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void); VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void); diff --git a/src/vm/cogitARMv5.c b/src/vm/cogitARMv5.c index 60674c0593..e06619615e 100644 --- a/src/vm/cogitARMv5.c +++ b/src/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -319,10 +319,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [5]; + usqIntptr_t machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -438,7 +438,7 @@ static sqInt NoDbgRegParms isAnInstruction(AbstractInstruction * self_in_isAnIns static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -497,7 +497,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms inverseOpcodeFor(AbstractInstruction * self_in_inverseOpcodeFor, sqInt armOpcode); static sqInt NoDbgRegParms isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress); static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); -static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand); +static sqInt NoDbgRegParms isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCRelativeValueLoad(AbstractInstruction * self_in_isPCRelativeValueLoad, unsigned int instr); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); @@ -700,7 +700,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -916,7 +916,7 @@ static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmp static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral); static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static usqInt NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable); static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms literalLoadInstructionBytes(AbstractInstruction * self_in_literalLoadInstructionBytes); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); @@ -1171,7 +1171,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceClosureCopyTrampoline; static sqInt ceCPICMissTrampoline; @@ -1181,9 +1181,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceMethodAbortTrampoline; @@ -1207,7 +1207,7 @@ static sqInt ceStoreContextInstVarTrampoline; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1225,7 +1225,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1528,7 +1528,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1598,10 +1598,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -1854,7 +1854,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2457,8 +2457,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - unsigned long hiReg; - unsigned long loReg; + usqIntptr_t hiReg; + usqIntptr_t loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2524,7 +2524,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - unsigned long flags; + usqIntptr_t flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2554,8 +2554,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - unsigned long srcA; - unsigned long srcB; + usqIntptr_t srcA; + usqIntptr_t srcB; /* NOTE: srcB contains the other mutiplicand at this point. It is OK to use it as the destination for the low part of the result and in fact this saves us moving it later */ @@ -2608,7 +2608,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -2737,54 +2737,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord81; sqInt aWord82; sqInt aWord9; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; - unsigned long baseReg; - unsigned long baseReg1; - unsigned long baseReg2; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; + usqIntptr_t baseReg; + usqIntptr_t baseReg1; + usqIntptr_t baseReg2; sqInt constant; - unsigned long constant1; - unsigned long constant10; - unsigned long constant11; - unsigned long constant12; - unsigned long constant13; - unsigned long constant14; - unsigned long constant2; - unsigned long constant3; - unsigned long constant4; - unsigned long constant5; - unsigned long constant6; - unsigned long constant7; - unsigned long constant8; - unsigned long constant9; + usqIntptr_t constant1; + usqIntptr_t constant10; + usqIntptr_t constant11; + usqIntptr_t constant12; + usqIntptr_t constant13; + usqIntptr_t constant14; + usqIntptr_t constant2; + usqIntptr_t constant3; + usqIntptr_t constant4; + usqIntptr_t constant5; + usqIntptr_t constant6; + usqIntptr_t constant7; + usqIntptr_t constant8; + usqIntptr_t constant9; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destAddr; - unsigned long destAddr1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destAddr; + usqIntptr_t destAddr1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt distance2; - unsigned long distReg; - unsigned long distReg1; - unsigned long distReg2; - unsigned long dstReg; - unsigned long dstReg1; + usqIntptr_t distReg; + usqIntptr_t distReg1; + usqIntptr_t distReg2; + usqIntptr_t dstReg; + usqIntptr_t dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode2; @@ -2793,7 +2793,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode5; sqInt flagsOrOpcode6; sqInt flagsOrOpcode7; - unsigned long fpReg; + usqIntptr_t fpReg; sqInt hb; sqInt hb1; sqInt hb2; @@ -2839,10 +2839,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -2943,7 +2943,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -2959,84 +2959,84 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset31; sqInt offset32; sqInt offset33; - long offset4; + sqIntptr_t offset4; sqInt offset5; sqInt offset6; - long offset7; + sqIntptr_t offset7; sqInt offset8; sqInt offset9; sqInt p; - unsigned long rd; - unsigned long rd1; - unsigned long rd10; - unsigned long rd11; - unsigned long rd12; - unsigned long rd13; - unsigned long rd14; - unsigned long rd15; - unsigned long rd16; - unsigned long rd17; - unsigned long rd18; - unsigned long rd19; - unsigned long rd2; - unsigned long rd20; - unsigned long rd21; - unsigned long rd22; - unsigned long rd23; - unsigned long rd24; - unsigned long rd3; - unsigned long rd4; - unsigned long rd5; - unsigned long rd6; - unsigned long rd7; - unsigned long rd8; - unsigned long rd9; - unsigned long reg; - unsigned long reg1; - unsigned long reg2; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long regA; - unsigned long regB; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long rn; - unsigned long rn1; - unsigned long rn10; - unsigned long rn11; - unsigned long rn12; - unsigned long rn13; - unsigned long rn14; - unsigned long rn15; - unsigned long rn16; - unsigned long rn17; - unsigned long rn18; - unsigned long rn19; - unsigned long rn2; - unsigned long rn20; - unsigned long rn21; - unsigned long rn22; - unsigned long rn23; - unsigned long rn24; - unsigned long rn25; - unsigned long rn26; - unsigned long rn3; - unsigned long rn4; - unsigned long rn5; - unsigned long rn6; - unsigned long rn7; - unsigned long rn8; - unsigned long rn9; + usqIntptr_t rd; + usqIntptr_t rd1; + usqIntptr_t rd10; + usqIntptr_t rd11; + usqIntptr_t rd12; + usqIntptr_t rd13; + usqIntptr_t rd14; + usqIntptr_t rd15; + usqIntptr_t rd16; + usqIntptr_t rd17; + usqIntptr_t rd18; + usqIntptr_t rd19; + usqIntptr_t rd2; + usqIntptr_t rd20; + usqIntptr_t rd21; + usqIntptr_t rd22; + usqIntptr_t rd23; + usqIntptr_t rd24; + usqIntptr_t rd3; + usqIntptr_t rd4; + usqIntptr_t rd5; + usqIntptr_t rd6; + usqIntptr_t rd7; + usqIntptr_t rd8; + usqIntptr_t rd9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg2; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t regA; + usqIntptr_t regB; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t rn; + usqIntptr_t rn1; + usqIntptr_t rn10; + usqIntptr_t rn11; + usqIntptr_t rn12; + usqIntptr_t rn13; + usqIntptr_t rn14; + usqIntptr_t rn15; + usqIntptr_t rn16; + usqIntptr_t rn17; + usqIntptr_t rn18; + usqIntptr_t rn19; + usqIntptr_t rn2; + usqIntptr_t rn20; + usqIntptr_t rn21; + usqIntptr_t rn22; + usqIntptr_t rn23; + usqIntptr_t rn24; + usqIntptr_t rn25; + usqIntptr_t rn26; + usqIntptr_t rn3; + usqIntptr_t rn4; + usqIntptr_t rn5; + usqIntptr_t rn6; + usqIntptr_t rn7; + usqIntptr_t rn8; + usqIntptr_t rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3051,30 +3051,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - unsigned long src; - unsigned long src1; - unsigned long srcAddr; - unsigned long srcAddr1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg14; - unsigned long srcReg15; - unsigned long srcReg16; - unsigned long srcReg17; - unsigned long srcReg18; - unsigned long srcReg19; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcAddr; + usqIntptr_t srcAddr1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg14; + usqIntptr_t srcReg15; + usqIntptr_t srcReg16; + usqIntptr_t srcReg17; + usqIntptr_t srcReg18; + usqIntptr_t srcReg19; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt u; int u1; sqInt u2; @@ -3083,14 +3083,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - long val; - long val1; - unsigned long val2; - long val3; - long val4; - long val5; - long val6; - long val7; + sqIntptr_t val; + sqIntptr_t val1; + usqIntptr_t val2; + sqIntptr_t val3; + sqIntptr_t val4; + sqIntptr_t val5; + sqIntptr_t val6; + sqIntptr_t val7; sqInt value; unsigned int value1; unsigned int value2; @@ -3099,9 +3099,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value5; unsigned int value6; sqInt word; - unsigned long word1; + usqIntptr_t word1; sqInt word2; - unsigned long word3; + usqIntptr_t word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -3167,11 +3167,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget = jumpTarget1; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord43 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord43; instrOffset6 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3201,11 +3201,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) jumpTarget2 = jumpTarget11; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord44 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord44; instrOffset7 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3722,11 +3722,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd2 = rn4; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord45 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord45; instrOffset8 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3820,7 +3820,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val5 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val5) { rot11 = 32 - i13; - immediate14 = (((usqInt) val5) >> i13) | ((((long)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val5) >> i13) | ((((sqIntptr_t)((usqInt)(val5) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord46 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn5 << 16) | (rd3 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord46; @@ -3853,11 +3853,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd22 = rn24; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord80 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord80; instrOffset27 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -3937,11 +3937,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd4 = rn6; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord47 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord47; instrOffset9 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4025,11 +4025,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd5 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord48 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord48; instrOffset10 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4064,7 +4064,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val6 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val6) { rot12 = 32 - i14; - immediate15 = (((usqInt) val6) >> i14) | ((((long)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); + immediate15 = (((usqInt) val6) >> i14) | ((((sqIntptr_t)((usqInt)(val6) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord49 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn8 << 16) | (rd6 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot12) >> 1)) << 8))) | immediate15) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord49; @@ -4097,11 +4097,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd23 = rn25; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord81 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord81; instrOffset28 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4176,11 +4176,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd7 = rn9; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord50 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord50; instrOffset11 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4228,11 +4228,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd8 = rn10; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord51 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord51; instrOffset12 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4326,7 +4326,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i15 = 2; i15 <= 30; i15 += 2) { if ((val7 & (((0xFFU << i15) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i15)))) == val7) { rot13 = 32 - i15; - immediate16 = (((usqInt) val7) >> i15) | ((((long)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); + immediate16 = (((usqInt) val7) >> i15) | ((((sqIntptr_t)((usqInt)(val7) << (32 - i15)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord52 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd9 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate16) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord52; @@ -4359,11 +4359,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd24 = rn26; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord82 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord82; instrOffset29 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4387,11 +4387,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd10 = rn12; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord53 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord53; instrOffset13 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4407,11 +4407,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd11 = rn13; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord54 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord54; instrOffset14 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4427,11 +4427,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd12 = 0; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord55 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord55; instrOffset15 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4447,11 +4447,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd13 = rn15; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord56 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord56; instrOffset16 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4467,11 +4467,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd14 = rn16; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord57 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord57; instrOffset17 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4487,11 +4487,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) rd15 = rn17; /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord58 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord58; instrOffset18 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4651,11 +4651,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord36 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord36; instrOffset = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4855,11 +4855,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord213 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord213; instrOffset19 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4884,11 +4884,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord214 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord214; instrOffset20 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4913,11 +4913,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord215 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord215; instrOffset21 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4942,11 +4942,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord216 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord216; instrOffset22 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -4997,11 +4997,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord310 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord310; instrOffset23 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5058,11 +5058,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord311 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord311; instrOffset24 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5119,11 +5119,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord312 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord312; instrOffset25 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); } @@ -5169,11 +5169,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord38 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord38; instrOffset1 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5229,11 +5229,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord39 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord39; instrOffset2 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5340,11 +5340,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) else { /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord40 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord40; instrOffset3 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -5431,11 +5431,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord41 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord41; instrOffset4 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4))); @@ -5514,11 +5514,11 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_dispatchConcretize->dependent))->address))); - assert((abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord220 = ldrrnplusimm(self_in_dispatchConcretize, ConcreteIPReg, PC, (((((self_in_dispatchConcretize->dependent))->address)) >= (((self_in_dispatchConcretize->address)) + 8) ? 1 - : 0), abs((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); + : 0), SQABS((((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)))); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord220; instrOffset26 = ((self_in_dispatchConcretize->machineCodeSize) = 4); /* begin machineCodeAt:put: */ @@ -6073,7 +6073,7 @@ isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, s /* CogARMCompiler>>#isInImmediateJumpRange: */ static sqInt NoDbgRegParms -isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand) +isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, usqIntptr_t operand) { return (((((int) operand)) >= -33554432) && ((((int) operand)) <= 0x1FFFFFC)); } @@ -6244,11 +6244,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - unsigned long distance; + usqIntptr_t distance; sqInt i; sqInt immediate; sqInt negate; - unsigned long operand; + usqIntptr_t operand; sqInt rot; sqInt value; @@ -6298,11 +6298,11 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) } /* begin moveCw:intoR: */ assert(addressIsInCurrentCompilation((((self_in_loadCwInto->dependent))->address))); - assert((abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); + assert((SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))) < (1U << 12)); /* begin machineCodeAt:put: */ aWord1 = ldrrnplusimm(self_in_loadCwInto, destReg, PC, (((((self_in_loadCwInto->dependent))->address)) >= (((self_in_loadCwInto->address)) + 8) ? 1 - : 0), abs((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); + : 0), SQABS((((((self_in_loadCwInto->dependent))->address)) - (((self_in_loadCwInto->address)) + 8)))); ((self_in_loadCwInto->machineCode))[0 / 4] = aWord1; return ((usqInt) (((self_in_loadCwInto->machineCodeSize) = 4))); } @@ -8181,7 +8181,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca sqInt address; usqInt addressFollowingJump; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8371,9 +8371,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -8620,7 +8620,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction)) { @@ -9004,8 +9004,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -9101,7 +9101,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -9833,8 +9833,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) sqInt address1; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -9908,7 +9908,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -9916,7 +9916,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -10010,7 +10010,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -10107,14 +10107,14 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + usqIntptr_t delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + usqIntptr_t location; + usqIntptr_t mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -10177,9 +10177,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -10271,9 +10271,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -10305,8 +10305,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -10325,7 +10325,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -10334,7 +10334,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -10875,9 +10875,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -10906,7 +10906,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -11254,7 +11254,7 @@ gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -15703,14 +15703,14 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s sqInt address; sqInt address1; sqInt address2; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; AbstractInstruction *anInstruction4; AbstractInstruction *jumpFail; - unsigned long newFloatHeaderSansHash; + usqIntptr_t newFloatHeaderSansHash; allocSize = BaseHeaderSize + (sizeof(double)); newFloatHeaderSansHash = (((((int)((usqInt)(ClassFloatCompactIndex) << (compactClassFieldLSB())))) | (formatOfClass(classFloat()))) | allocSize) | HeaderTypeShort; @@ -17243,7 +17243,7 @@ inlineCacheTagForInstance(sqInt oop) sqInt cci; if ((oop & 1)) { - return ((0 << 1) | 1); + return (((usqInt)0 << 1) | 1); } if (((cci = noShiftCompactClassIndexOf(oop))) > 0) { return cci; @@ -17367,7 +17367,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - unsigned long literal; + usqIntptr_t literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -17421,7 +17421,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) */ /* CogOutOfLineLiteralsARMCompiler>>#isSharable */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms isSharable(AbstractInstruction * self_in_isSharable) { assert(((self_in_isSharable->opcode)) == Literal); @@ -17625,7 +17625,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -18626,7 +18626,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -18644,7 +18644,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ checkLiteralforInstruction(address10, genoperandoperand(MoveRAw, TempReg, address10)); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ checkLiteralforInstruction(callTarget1, genoperand(CallFull, callTarget1)); @@ -19434,7 +19434,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ checkLiteralforInstruction(callTarget, genoperand(CallFull, callTarget)); @@ -19513,7 +19513,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -19790,15 +19790,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -20017,9 +20017,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -20037,17 +20037,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -20057,7 +20057,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -20316,7 +20316,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -20921,13 +20921,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -22191,7 +22191,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -22661,7 +22661,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/src/vm/cogitIA32.c b/src/vm/cogitIA32.c index af9e10829c..2671793e54 100644 --- a/src/vm/cogitIA32.c +++ b/src/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -335,8 +335,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -452,7 +452,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta); @@ -508,7 +508,7 @@ static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instr static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc); static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc); static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent); -static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand); +static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize); static sqInt NoDbgRegParms jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize); @@ -688,7 +688,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1133,7 +1133,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceClosureCopyTrampoline; static sqInt ceCPICMissTrampoline; @@ -1143,9 +1143,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceMethodAbortTrampoline; @@ -1169,7 +1169,7 @@ static sqInt ceStoreContextInstVarTrampoline; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1187,7 +1187,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1486,7 +1486,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1554,10 +1554,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -1817,7 +1817,7 @@ isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -2365,7 +2365,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - unsigned long shiftCountReg; + usqIntptr_t shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2379,7 +2379,7 @@ computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32) { - unsigned long word; + usqIntptr_t word; word = ((self_in_concretizeFill32->operands))[0]; ((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF); @@ -2393,8 +2393,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2407,8 +2407,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - unsigned long regLHS; - unsigned long regRHS; + usqIntptr_t regLHS; + usqIntptr_t regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2425,8 +2425,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2470,41 +2470,41 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long addressOperand2; - unsigned long addressOperand3; - unsigned long addressOperand4; - unsigned long base; - unsigned long base1; - unsigned long base2; - unsigned long base3; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t addressOperand2; + usqIntptr_t addressOperand3; + usqIntptr_t addressOperand4; + usqIntptr_t base; + usqIntptr_t base1; + usqIntptr_t base2; + usqIntptr_t base3; AbstractInstruction *dependentChain; - unsigned long dest; - unsigned long dest1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg10; - unsigned long destReg11; - unsigned long destReg12; - unsigned long destReg13; - unsigned long destReg14; - unsigned long destReg15; - unsigned long destReg2; - unsigned long destReg3; - unsigned long destReg4; - unsigned long destReg5; - unsigned long destReg6; - unsigned long destReg7; - unsigned long destReg8; - unsigned long destReg9; + usqIntptr_t dest; + usqIntptr_t dest1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg10; + usqIntptr_t destReg11; + usqIntptr_t destReg12; + usqIntptr_t destReg13; + usqIntptr_t destReg14; + usqIntptr_t destReg15; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t destReg4; + usqIntptr_t destReg5; + usqIntptr_t destReg6; + usqIntptr_t destReg7; + usqIntptr_t destReg8; + usqIntptr_t destReg9; sqInt distance; sqInt distance1; sqInt i; - unsigned long index; - unsigned long index1; - unsigned long index2; - unsigned long index3; + usqIntptr_t index; + usqIntptr_t index1; + usqIntptr_t index2; + usqIntptr_t index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2571,14 +2571,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - unsigned long mask; - unsigned long mask1; - unsigned long mask2; + usqIntptr_t mask; + usqIntptr_t mask1; + usqIntptr_t mask2; sqInt mcIdx; sqInt offset; - unsigned long offset1; - unsigned long offset10; - unsigned long offset11; + usqIntptr_t offset1; + usqIntptr_t offset10; + usqIntptr_t offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -2589,7 +2589,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - unsigned long offset12; + usqIntptr_t offset12; sqInt offset120; sqInt offset121; sqInt offset122; @@ -2601,7 +2601,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset17; sqInt offset18; sqInt offset19; - unsigned long offset2; + usqIntptr_t offset2; sqInt offset20; sqInt offset21; sqInt offset22; @@ -2612,108 +2612,108 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - unsigned long offset3; + usqIntptr_t offset3; sqInt offset30; sqInt offset31; sqInt offset32; - unsigned long offset4; - unsigned long offset5; - unsigned long offset6; - unsigned long offset7; - unsigned long offset8; - unsigned long offset9; - unsigned long reg; - unsigned long reg1; - unsigned long reg10; - unsigned long reg11; - unsigned long reg12; - unsigned long reg13; - unsigned long reg14; - unsigned long reg15; - unsigned long reg16; - unsigned long reg17; - unsigned long reg18; - unsigned long reg19; - unsigned long reg2; - unsigned long reg20; - unsigned long reg21; - unsigned long reg22; - unsigned long reg23; - unsigned long reg24; - unsigned long reg25; - unsigned long reg26; - unsigned long reg3; - unsigned long reg4; - unsigned long reg5; - unsigned long reg6; - unsigned long reg7; - unsigned long reg8; - unsigned long reg9; - unsigned long regLHS; - unsigned long regLHS1; - unsigned long regLHS10; - unsigned long regLHS11; - unsigned long regLHS12; - unsigned long regLHS13; - unsigned long regLHS2; - unsigned long regLHS3; - unsigned long regLHS4; - unsigned long regLHS5; - unsigned long regLHS6; - unsigned long regLHS7; - unsigned long regLHS8; - unsigned long regLHS9; - unsigned long regRHS; - unsigned long regRHS1; - unsigned long regRHS10; - unsigned long regRHS11; - unsigned long regRHS12; - unsigned long regRHS13; - unsigned long regRHS2; - unsigned long regRHS3; - unsigned long regRHS4; - unsigned long regRHS5; - unsigned long regRHS6; - unsigned long regRHS7; - unsigned long regRHS8; - unsigned long regRHS9; - unsigned long regToShift; - unsigned long regToShift1; + usqIntptr_t offset4; + usqIntptr_t offset5; + usqIntptr_t offset6; + usqIntptr_t offset7; + usqIntptr_t offset8; + usqIntptr_t offset9; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg10; + usqIntptr_t reg11; + usqIntptr_t reg12; + usqIntptr_t reg13; + usqIntptr_t reg14; + usqIntptr_t reg15; + usqIntptr_t reg16; + usqIntptr_t reg17; + usqIntptr_t reg18; + usqIntptr_t reg19; + usqIntptr_t reg2; + usqIntptr_t reg20; + usqIntptr_t reg21; + usqIntptr_t reg22; + usqIntptr_t reg23; + usqIntptr_t reg24; + usqIntptr_t reg25; + usqIntptr_t reg26; + usqIntptr_t reg3; + usqIntptr_t reg4; + usqIntptr_t reg5; + usqIntptr_t reg6; + usqIntptr_t reg7; + usqIntptr_t reg8; + usqIntptr_t reg9; + usqIntptr_t regLHS; + usqIntptr_t regLHS1; + usqIntptr_t regLHS10; + usqIntptr_t regLHS11; + usqIntptr_t regLHS12; + usqIntptr_t regLHS13; + usqIntptr_t regLHS2; + usqIntptr_t regLHS3; + usqIntptr_t regLHS4; + usqIntptr_t regLHS5; + usqIntptr_t regLHS6; + usqIntptr_t regLHS7; + usqIntptr_t regLHS8; + usqIntptr_t regLHS9; + usqIntptr_t regRHS; + usqIntptr_t regRHS1; + usqIntptr_t regRHS10; + usqIntptr_t regRHS11; + usqIntptr_t regRHS12; + usqIntptr_t regRHS13; + usqIntptr_t regRHS2; + usqIntptr_t regRHS3; + usqIntptr_t regRHS4; + usqIntptr_t regRHS5; + usqIntptr_t regRHS6; + usqIntptr_t regRHS7; + usqIntptr_t regRHS8; + usqIntptr_t regRHS9; + usqIntptr_t regToShift; + usqIntptr_t regToShift1; sqInt shiftCount; - unsigned long shiftCountReg; - unsigned long shiftCountReg1; - unsigned long src; - unsigned long src1; - unsigned long srcReg; - unsigned long srcReg1; - unsigned long srcReg10; - unsigned long srcReg11; - unsigned long srcReg12; - unsigned long srcReg13; - unsigned long srcReg2; - unsigned long srcReg3; - unsigned long srcReg4; - unsigned long srcReg5; - unsigned long srcReg6; - unsigned long srcReg7; - unsigned long srcReg8; - unsigned long srcReg9; + usqIntptr_t shiftCountReg; + usqIntptr_t shiftCountReg1; + usqIntptr_t src; + usqIntptr_t src1; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; + usqIntptr_t srcReg10; + usqIntptr_t srcReg11; + usqIntptr_t srcReg12; + usqIntptr_t srcReg13; + usqIntptr_t srcReg2; + usqIntptr_t srcReg3; + usqIntptr_t srcReg4; + usqIntptr_t srcReg5; + usqIntptr_t srcReg6; + usqIntptr_t srcReg7; + usqIntptr_t srcReg8; + usqIntptr_t srcReg9; sqInt swapreg; - unsigned long value; - unsigned long value1; - unsigned long value10; - unsigned long value11; - unsigned long value12; - unsigned long value13; - unsigned long value2; - unsigned long value3; - unsigned long value4; - unsigned long value5; - unsigned long value6; - unsigned long value7; - unsigned long value8; - unsigned long value9; - unsigned long word; + usqIntptr_t value; + usqIntptr_t value1; + usqIntptr_t value10; + usqIntptr_t value11; + usqIntptr_t value12; + usqIntptr_t value13; + usqIntptr_t value2; + usqIntptr_t value3; + usqIntptr_t value4; + usqIntptr_t value5; + usqIntptr_t value6; + usqIntptr_t value7; + usqIntptr_t value8; + usqIntptr_t value9; + usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { dispatchConcretizeProcessorSpecific(self_in_dispatchConcretize); @@ -5011,25 +5011,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - unsigned long addressOperand; - unsigned long addressOperand1; - unsigned long destReg; - unsigned long destReg1; - unsigned long destReg2; - unsigned long destReg3; - unsigned long offset; - unsigned long offset1; - unsigned long offset2; - unsigned long offset3; - unsigned long reg; - unsigned long reg1; - unsigned long reg11; - unsigned long reg2; - unsigned long reg21; - unsigned long reg3; - unsigned long regDivisor; - unsigned long srcReg; - unsigned long srcReg1; + usqIntptr_t addressOperand; + usqIntptr_t addressOperand1; + usqIntptr_t destReg; + usqIntptr_t destReg1; + usqIntptr_t destReg2; + usqIntptr_t destReg3; + usqIntptr_t offset; + usqIntptr_t offset1; + usqIntptr_t offset2; + usqIntptr_t offset3; + usqIntptr_t reg; + usqIntptr_t reg1; + usqIntptr_t reg11; + usqIntptr_t reg2; + usqIntptr_t reg21; + usqIntptr_t reg3; + usqIntptr_t regDivisor; + usqIntptr_t srcReg; + usqIntptr_t srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6154,7 +6154,7 @@ isPCDependent(AbstractInstruction * self_in_isPCDependent) /* CogIA32Compiler>>#isQuick: */ static sqInt NoDbgRegParms -isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) +isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand) { return (((((int) operand)) >= -128) && ((((int) operand)) <= 0x7F)); } @@ -6650,9 +6650,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - unsigned long alignment; - unsigned long maximumSpan; - unsigned long target; + usqIntptr_t alignment; + usqIntptr_t maximumSpan; + usqIntptr_t target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -7008,7 +7008,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - sqInt end; + usqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -8008,7 +8008,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -8197,9 +8197,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -8435,7 +8435,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -8765,8 +8765,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -8862,7 +8862,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod sqInt caseEndAddress; sqInt operand; sqInt pc; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -9577,8 +9577,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -9637,7 +9637,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -9645,7 +9645,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -9735,7 +9735,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -9839,7 +9839,7 @@ generateMapAtstart(sqInt addressOrNull, sqInt startAddress) sqInt location; sqInt mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -9897,9 +9897,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -9991,9 +9991,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -10026,8 +10026,8 @@ static void genGetLeafCallStackPointer(void) { AbstractInstruction *anInstruction; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt startAddress; @@ -10047,7 +10047,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -10061,7 +10061,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -10545,12 +10545,12 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; - unsigned long fixupSize1; + usqIntptr_t fixupSize; + usqIntptr_t fixupSize1; sqInt numberOfAbstractOpcodes; sqInt numberOfAbstractOpcodes1; - unsigned long opcodeSize; - unsigned long opcodeSize1; + usqIntptr_t opcodeSize; + usqIntptr_t opcodeSize1; sqInt startAddress1; sqInt startAddress2; @@ -10575,7 +10575,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateCheckFeatures(backEnd); outputInstructionsForGeneratedRuntimeAt(startAddress2); recordGeneratedRunTimeaddress("ceCheckFeaturesFunction", startAddress2); - ceCheckFeaturesFunction = ((unsigned long (*)(void)) startAddress2); + ceCheckFeaturesFunction = ((usqIntptr_t (*)(void)) startAddress2); /* begin maybeGenerateICacheFlush */ /* begin generateVMOwnerLockFunctions */ @@ -10596,7 +10596,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -10956,7 +10956,7 @@ gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -15353,7 +15353,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s sqInt address; sqInt address1; sqInt address2; - unsigned long allocSize; + usqIntptr_t allocSize; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; @@ -15363,7 +15363,7 @@ genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt s AbstractInstruction *anInstruction6; AbstractInstruction *anInstruction7; AbstractInstruction *jumpFail; - unsigned long newFloatHeaderSansHash; + usqIntptr_t newFloatHeaderSansHash; allocSize = BaseHeaderSize + (sizeof(double)); newFloatHeaderSansHash = (((((int)((usqInt)(ClassFloatCompactIndex) << (compactClassFieldLSB())))) | (formatOfClass(classFloat()))) | allocSize) | HeaderTypeShort; @@ -16602,7 +16602,7 @@ inlineCacheTagForInstance(sqInt oop) sqInt cci; if ((oop & 1)) { - return ((0 << 1) | 1); + return (((usqInt)0 << 1) | 1); } if (((cci = noShiftCompactClassIndexOf(oop))) > 0) { return cci; @@ -17226,7 +17226,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction111 = genoperand(CallFull, callTarget); abstractInstruction2 = anInstruction111; @@ -17243,7 +17243,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin annotateCall: */ anInstruction112 = genoperand(CallFull, callTarget1); abstractInstruction3 = anInstruction112; @@ -17968,7 +17968,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) should be up-to-date. Need to save and restore the link reg around this call. */ jmpTarget(jmpSample, gLabel()); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin annotateCall: */ anInstruction18 = genoperand(CallFull, callTarget); abstractInstruction = anInstruction18; @@ -18047,7 +18047,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -18312,15 +18312,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -18535,9 +18535,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -18555,17 +18555,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -18575,7 +18575,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -18834,7 +18834,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -19419,13 +19419,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -20638,7 +20638,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -21077,7 +21077,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/src/vm/cogitMIPSEL.c b/src/vm/cogitMIPSEL.c index d8cb267f06..2409192537 100644 --- a/src/vm/cogitMIPSEL.c +++ b/src/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGenerator VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b from - StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1985 uuid: 7c12723c-9f09-4d4e-832b-f01fd783899b " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -363,10 +363,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - unsigned long operands [3]; - unsigned long address; + usqIntptr_t operands [3]; + usqIntptr_t address; struct _AbstractInstruction *dependent; - unsigned long machineCode [7]; + usqIntptr_t machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -479,7 +479,7 @@ static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstr static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress); static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress); static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction); -static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset); static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress); static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1276,7 +1276,7 @@ void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void); void (*ceCallCogCodePopReceiverReg)(void); sqInt ceCannotResumeTrampoline; void (*ceCaptureCStackPointers)(void); -static unsigned long (*ceCheckFeaturesFunction)(void); +static usqIntptr_t (*ceCheckFeaturesFunction)(void); sqInt ceCheckForInterruptTrampoline; static sqInt ceClosureCopyTrampoline; static sqInt ceCPICMissTrampoline; @@ -1286,9 +1286,9 @@ static sqInt ceFetchContextInstVarTrampoline; static sqInt ceFFICalloutTrampoline; static sqInt ceFloatObjectOfTrampoline; static sqInt ceFloatValueOfTrampoline; -static void (*ceFlushICache)(unsigned long from, unsigned long to); -unsigned long (*ceGetFP)(void); -unsigned long (*ceGetSP)(void); +static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); +usqIntptr_t (*ceGetFP)(void); +usqIntptr_t (*ceGetSP)(void); static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceMethodAbortTrampoline; @@ -1312,7 +1312,7 @@ static sqInt ceStoreContextInstVarTrampoline; static sqInt ceTraceBlockActivationTrampoline; static sqInt ceTraceLinkedSendTrampoline; static sqInt ceTraceStoreTrampoline; -unsigned long (*ceTryLockVMOwner)(void); +usqIntptr_t (*ceTryLockVMOwner)(void); void (*ceUnlockVMOwner)(void); sqInt cFramePointerInUse; static sqInt closedPICSize; @@ -1330,7 +1330,7 @@ static sqInt deadCode; static sqInt debugBytecodePointers; static sqInt debugFixupBreaks; static sqInt debugOpcodeIndices; -unsigned long debugPrimCallStackOffset; +usqIntptr_t debugPrimCallStackOffset; static sqInt debugStackPointers; static sqInt directedSuperSendTrampolines[NumSendTrampolines]; static sqInt disassemblingMethod; @@ -1629,7 +1629,7 @@ static sqInt methodObj; static sqInt methodOrBlockNumArgs; static sqInt methodOrBlockNumTemps; static sqInt methodZoneBase; -static unsigned long minValidCallAddress; +static usqIntptr_t minValidCallAddress; sqInt missOffset; static usqInt mzFreeStart; static sqInt needsFrame; @@ -1693,10 +1693,10 @@ static usqInt youngReferrers; #define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline) #define ceCheckFeatures() ceCheckFeaturesFunction() #define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline) -#define cFramePointerAddress() ((unsigned long)&CFramePointer) +#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer) #define compileSendTrace() ((traceFlags & 258) == 258) #define cr() putchar('\n') -#define cStackPointerAddress() ((unsigned long)&CStackPointer) +#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer) #define entryOffset() cmEntryOffset #define generatorAt(index) (&generatorTable[index]) #define getCFramePointer() CFramePointer @@ -1948,7 +1948,7 @@ jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstra compileBlockFrameBuild: */ /* CogAbstractInstruction>>#labelOffset */ -static usqInt NoDbgRegParms +static usqIntptr_t NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset) { return ((self_in_labelOffset->operands))[1]; @@ -3282,7 +3282,7 @@ cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt ca { sqInt address; sqInt operand; - unsigned long target; + usqIntptr_t target; compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase); assert(!(inlineCacheTagIsYoung(caseNTag))); @@ -3471,9 +3471,9 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) { sqInt codeSize; sqInt end; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; CogMethod *pic; sqInt startAddress; @@ -3717,7 +3717,7 @@ compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) /* N.B. FLAGS := TempReg - startpc */ blockStart = blockStartAt(halfWay); /* begin CmpCq:R: */ - quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1); + quickConstant = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg); if (lowBlockStartIndex == halfWay) { @@ -4070,8 +4070,8 @@ computeEntryOffsets(void) { sqInt checkedEntryAlignment; sqInt entryPointMask; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; AbstractInstruction *sendMissCall; sqInt uncheckedEntryAlignment; @@ -4166,7 +4166,7 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod { sqInt caseEndAddress; sqInt operand; - unsigned long targetEntry; + usqIntptr_t targetEntry; assert(case1Method != null); rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs)); @@ -4891,8 +4891,8 @@ generateCaptureCStackPointers(sqInt captureFramePointer) AbstractInstruction *anInstruction1; AbstractInstruction *anInstruction2; AbstractInstruction *anInstruction3; - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt quickConstant; sqInt quickConstant1; sqInt startAddress; @@ -4962,7 +4962,7 @@ generateClosedPICPrototype(void) AbstractInstruction * cPICEndOfCodeLabel; sqInt endAddress; AbstractInstruction * endCPICCase1; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt h; AbstractInstruction *jumpNext; sqInt jumpTarget; @@ -4970,7 +4970,7 @@ generateClosedPICPrototype(void) sqInt jumpTarget2; sqInt numArgs; sqInt opcode; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt wordConstant; sqInt wordConstant1; @@ -5060,7 +5060,7 @@ static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector) { sqInt codeSize; - unsigned long headerSize; + usqIntptr_t headerSize; sqInt mapSize; CogMethod *method; sqInt result; @@ -5164,7 +5164,7 @@ generateMapAtstart(sqInt addressOrNull, sqInt startAddress) sqInt location; sqInt mapEntry; sqInt maxDelta; - usqInt mcpc; + usqIntptr_t mcpc; length = 0; location = startAddress; @@ -5222,9 +5222,9 @@ static void generateOpenPICPrototype(void) { sqInt codeSize; - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt mapSize; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; /* begin allocateOpcodes:bytecodes: */ numAbstractOpcodes = 100; @@ -5316,9 +5316,9 @@ generateStackPointerCapture(void) static void generateTrampolines(void) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt methodZoneStart; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; methodZoneStart = methodZoneBase; (methodLabel->address = methodZoneStart); @@ -5350,8 +5350,8 @@ generateTrampolines(void) static void genGetLeafCallStackPointer(void) { - unsigned long fixupSize; - unsigned long opcodeSize; + usqIntptr_t fixupSize; + usqIntptr_t opcodeSize; sqInt startAddress; /* begin allocateOpcodes:bytecodes: */ @@ -5370,7 +5370,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetFP", startAddress); - ceGetFP = ((unsigned long (*)(void)) startAddress); + ceGetFP = ((usqIntptr_t (*)(void)) startAddress); startAddress = methodZoneBase; zeroOpcodeIndex(); /* begin MoveR:R: */ @@ -5379,7 +5379,7 @@ genGetLeafCallStackPointer(void) genoperand(RetN, 0); outputInstructionsForGeneratedRuntimeAt(startAddress); recordGeneratedRunTimeaddress("ceGetSP", startAddress); - ceGetSP = ((unsigned long (*)(void)) startAddress); + ceGetSP = ((usqIntptr_t (*)(void)) startAddress); } @@ -5867,9 +5867,9 @@ initializeBackend(void) void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) { - unsigned long fixupSize; + usqIntptr_t fixupSize; sqInt numberOfAbstractOpcodes; - unsigned long opcodeSize; + usqIntptr_t opcodeSize; sqInt startAddress1; initializeBackend(); @@ -5898,7 +5898,7 @@ initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress) generateLowLevelTryLock(backEnd, vmOwnerLockAddress()); outputInstructionsForGeneratedRuntimeAt(startAddress1); recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1); - ceTryLockVMOwner = ((unsigned long (*)(void)) startAddress1); + ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1); zeroOpcodeIndex(); initialPC = 0; endPC = numAbstractOpcodes - 1; @@ -9744,8 +9744,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -9783,8 +9783,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -9814,8 +9814,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -9836,8 +9836,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -9859,8 +9859,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -9890,8 +9890,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -9911,9 +9911,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long dstReg; - unsigned long srcReg; - unsigned long value; + usqIntptr_t dstReg; + usqIntptr_t srcReg; + usqIntptr_t value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -9938,8 +9938,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -9961,8 +9961,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -9978,7 +9978,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -9993,8 +9993,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -10029,9 +10029,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -10062,8 +10062,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -10099,8 +10099,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -10134,9 +10134,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -10166,9 +10166,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -10203,9 +10203,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -10240,9 +10240,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -10277,9 +10277,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -10314,9 +10314,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -10351,9 +10351,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -10388,9 +10388,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -10425,9 +10425,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - unsigned long leftReg; + usqIntptr_t leftReg; sqInt offset; - unsigned long rightReg; + usqIntptr_t rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -10533,8 +10533,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - unsigned long dividendReg; - unsigned long divisorReg; + usqIntptr_t dividendReg; + usqIntptr_t divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -10683,7 +10683,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -10784,8 +10784,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -10815,7 +10815,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -10830,8 +10830,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -10847,7 +10847,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - unsigned long reg; + usqIntptr_t reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -10862,8 +10862,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - unsigned long destReg; - unsigned long distReg; + usqIntptr_t destReg; + usqIntptr_t distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -10881,8 +10881,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -10914,8 +10914,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destReg; - unsigned long srcAddr; + usqIntptr_t destReg; + usqIntptr_t srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -10944,7 +10944,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -10964,7 +10964,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - unsigned long reg; + usqIntptr_t reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -10983,7 +10983,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -10997,7 +10997,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -11011,9 +11011,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -11029,9 +11029,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -11051,8 +11051,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - unsigned long baseReg; - unsigned long destReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -11087,8 +11087,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -11120,8 +11120,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long destAddr; - unsigned long srcReg; + usqIntptr_t destAddr; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -11150,9 +11150,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -11168,9 +11168,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - unsigned long destReg; + usqIntptr_t destReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -11186,9 +11186,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - unsigned long baseReg; + usqIntptr_t baseReg; sqInt offset; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -11204,8 +11204,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - unsigned long destReg; - unsigned long srcReg; + usqIntptr_t destReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -11221,9 +11221,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -11244,9 +11244,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long indexReg; - unsigned long srcReg; + usqIntptr_t baseReg; + usqIntptr_t indexReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -11269,9 +11269,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; /* index is number of *bytes* */ @@ -11294,9 +11294,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long baseReg; - unsigned long destReg; - unsigned long indexReg; + usqIntptr_t baseReg; + usqIntptr_t destReg; + usqIntptr_t indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -11322,8 +11322,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -11349,7 +11349,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - unsigned long reg; + usqIntptr_t reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -11373,8 +11373,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -11395,8 +11395,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -11418,8 +11418,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -11435,7 +11435,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - unsigned long destReg; + usqIntptr_t destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -11451,7 +11451,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - unsigned long addressOperand; + usqIntptr_t addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -11484,7 +11484,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - unsigned long value; + usqIntptr_t value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -11508,7 +11508,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - unsigned long srcReg; + usqIntptr_t srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -11568,8 +11568,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -11607,8 +11607,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -11638,8 +11638,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -11660,8 +11660,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -11683,8 +11683,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -11699,8 +11699,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -11720,8 +11720,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -11753,8 +11753,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - unsigned long leftReg; - unsigned long rightImm; + usqIntptr_t leftReg; + usqIntptr_t rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -11776,8 +11776,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - unsigned long leftReg; - unsigned long rightReg; + usqIntptr_t leftReg; + usqIntptr_t rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -13013,9 +13013,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - unsigned long newBranchLeft; + usqIntptr_t newBranchLeft; sqInt newBranchOpcode; - unsigned long newBranchRight; + usqIntptr_t newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -13311,7 +13311,7 @@ relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeRet static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) { - sqInt newTarget; + usqInt newTarget; usqInt oldTarget; assert((delta % 4) == 0); @@ -13682,7 +13682,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - unsigned long alignment; + usqIntptr_t alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -16021,7 +16021,7 @@ inlineCacheTagForInstance(sqInt oop) sqInt cci; if ((oop & 1)) { - return ((0 << 1) | 1); + return (((usqInt)0 << 1) | 1); } if (((cci = noShiftCompactClassIndexOf(oop))) > 0) { return cci; @@ -16634,7 +16634,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) jmpTarget(jmpSamplePrim, gLabel()); assert(flags & PrimCallNeedsNewMethod); /* begin CallFullRT: */ - callTarget = ((unsigned long)ceCheckProfileTick); + callTarget = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction28 = genoperand(CallFull, callTarget); @@ -16649,7 +16649,7 @@ compileInterpreterPrimitive(void (*primitiveRoutine)(void)) /* begin gen:operand:literal: */ anInstruction19 = genoperandoperand(MoveRAw, TempReg, address10); /* begin CallFullRT: */ - callTarget1 = ((unsigned long)ceCheckProfileTick); + callTarget1 = ((usqIntptr_t)ceCheckProfileTick); /* begin CallFull: */ anInstruction29 = genoperand(CallFull, callTarget1); @@ -17366,7 +17366,7 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling) /* begin saveAndRestoreLinkRegAround: */ inst = genoperand(PushR, LinkReg); /* begin CallFullRT: */ - callTarget = (unsigned long)ceCheckProfileTick; + callTarget = (usqIntptr_t)ceCheckProfileTick; /* begin CallFull: */ anInstruction17 = genoperand(CallFull, callTarget); @@ -17445,7 +17445,7 @@ genPushLiteralVariableBytecode(void) static sqInt genPushQuickIntegerConstantBytecode(void) { - return genPushLiteral((((byte0 - 117) << 1) | 1)); + return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1)); } /* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */ @@ -17710,15 +17710,15 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } return 4; } @@ -17933,9 +17933,9 @@ static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((blockEntryMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1)); introspectionDataIndex += 4; return 0; } @@ -17953,17 +17953,17 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa assert(introspectionDataIndex == 0); if (0) { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cbNoSwitchEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cbEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1)); } else { storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((cmEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject()); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, ((cmNoCheckEntryOffset << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1)); } - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((bcpc + 1) << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1)); introspectionDataIndex += 6; return 0; @@ -17973,7 +17973,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa ? bcpc + 1 : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, ((actualBcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); introspectionDataIndex += 2; } @@ -18232,7 +18232,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - unsigned long offset; + usqIntptr_t offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -18814,13 +18814,13 @@ compileBlockFramelessEntry(BlockStart *blockStart) static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector) { - unsigned long allocBytes; + usqIntptr_t allocBytes; int extra; - unsigned long fixupBytes; + usqIntptr_t fixupBytes; sqInt numBlocks; sqInt numBytecodes; sqInt numCleanBlocks; - unsigned long opcodeBytes; + usqIntptr_t opcodeBytes; sqInt result; methodOrBlockNumTemps = tempCountOf(methodObj); @@ -20050,7 +20050,7 @@ genPrimitiveClosureValue(void) genPushRegisterArgs(); genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg); /* begin CmpCq:R: */ - quickConstant = ((methodOrBlockNumArgs << 1) | 1); + quickConstant = (((usqInt)methodOrBlockNumArgs << 1) | 1); /* begin gen:quickConstant:operand: */ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg); /* begin JumpNonZero: */ @@ -20489,7 +20489,7 @@ genSpecialSelectorArithmetic(void) /* Must annotate the bytecode for correct pc mapping. */ return (ssPop(2), - ssPushAnnotatedConstant(((result << 1) | 1))); + ssPushAnnotatedConstant((((usqInt)result << 1) | 1))); } return genSpecialSelectorSend(); } diff --git a/src/vm/cointerp.c b/src/vm/cointerp.c index 7dcd7880f1..000f233ee6 100644 --- a/src/vm/cointerp.c +++ b/src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -521,7 +521,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -616,7 +616,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -810,7 +811,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -855,9 +856,9 @@ extern void fullGC(void); static usqInt NoDbgRegParms fwdTableInit(sqInt blkSize); static usqInt NoDbgRegParms fwdTableSize(sqInt blkSize); static usqInt imageSegmentVersion(void); -static usqInt incCompBody(void); +static sqInt incCompBody(void); static sqInt incCompMakeFwd(void); -static usqInt NoDbgRegParms incCompMove(sqInt bytesFreed); +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed); extern void incrementalGC(void); static void NoDbgRegParms initializeMemoryFirstFree(sqInt firstFree); static void NoDbgRegParms initializeObjectMemory(sqInt bytesToShift); @@ -1214,7 +1215,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1263,7 +1264,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1306,8 +1307,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1498,7 +1499,7 @@ _iss usqLong longRunningPrimitiveGCUsecs; _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt primTraceLog[256]; @@ -1508,13 +1509,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; _iss sqInt theUnknownShort; @@ -2145,7 +2146,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2240,7 +2241,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4982,7 +4983,7 @@ interpret(void) l245: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5008,7 +5009,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l247; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l247: /* end internalQuickPrimitiveResponse */; goto l248; } @@ -5139,7 +5140,7 @@ interpret(void) goto l246; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l246: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5309,7 +5310,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l27; } if (byte3 == InstructionPointerIndex) { @@ -5713,8 +5714,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -6053,7 +6054,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6189,7 +6190,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7168,7 +7169,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7312,7 +7313,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7443,7 +7444,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7551,7 +7552,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l168; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7596,7 +7597,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7780,7 +7781,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l180: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7824,7 +7825,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l182: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -8636,7 +8637,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -8756,7 +8757,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -8839,7 +8840,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -8852,7 +8853,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -9521,7 +9522,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -10728,7 +10729,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -10966,13 +10967,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -11003,8 +11004,8 @@ createClosureNumArgsnumCopiedstartpc(sqInt numArgs, sqInt numCopied, sqInt initi newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -11390,7 +11391,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -12052,7 +12053,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -12800,7 +12801,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -13286,7 +13287,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -13373,7 +13374,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -13382,10 +13383,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -13424,6 +13425,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -14133,12 +14135,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -14178,7 +14180,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -14729,7 +14731,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -14917,7 +14919,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -15150,7 +15152,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15377,7 +15379,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15470,90 +15472,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -15573,14 +15499,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -15897,7 +15823,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -16213,7 +16139,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -16547,7 +16473,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -16917,7 +16843,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -16929,7 +16855,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -17925,7 +17851,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -18042,7 +17968,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -18333,7 +18259,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -18453,6 +18379,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -18461,7 +18473,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -18502,14 +18514,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -18530,7 +18542,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19057,7 +19069,7 @@ primitiveAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -19112,7 +19124,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -19569,7 +19581,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19611,10 +19623,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19635,25 +19647,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -19666,10 +19678,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19690,25 +19702,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -19779,10 +19791,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19803,25 +19815,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -19834,10 +19846,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19858,25 +19870,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -19974,7 +19986,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -20107,10 +20119,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -20131,25 +20143,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -20161,10 +20173,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -20185,25 +20197,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -20263,7 +20275,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -20293,7 +20305,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -20552,7 +20564,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -20596,13 +20608,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -21467,7 +21479,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -21498,7 +21510,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -21565,7 +21577,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -21749,7 +21761,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21812,7 +21824,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22114,7 +22126,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -23794,10 +23806,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -23813,7 +23825,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23841,7 +23853,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23857,7 +23869,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -23938,8 +23950,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -24141,7 +24153,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -24322,7 +24334,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -24405,7 +24417,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24447,7 +24459,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -24455,10 +24467,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -24492,12 +24508,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -24537,7 +24553,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -24778,7 +24794,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -24808,7 +24824,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -25242,7 +25258,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -25271,7 +25287,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -25287,7 +25303,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -25304,7 +25320,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25385,7 +25401,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -25430,8 +25446,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25499,7 +25515,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -25669,7 +25685,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -25711,7 +25727,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -25719,7 +25735,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -25929,7 +25945,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26219,7 +26235,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -26720,7 +26736,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27079,7 +27095,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27089,7 +27105,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27136,7 +27152,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27146,7 +27162,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27171,7 +27187,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27181,7 +27197,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27216,7 +27232,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -27269,8 +27285,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -27713,7 +27729,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -27841,7 +27857,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -27896,7 +27912,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -28142,7 +28158,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -28586,7 +28602,7 @@ primitiveStringAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -28659,7 +28675,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -29064,7 +29080,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29361,7 +29377,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29520,7 +29536,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -29565,7 +29581,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -29642,7 +29658,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -29673,7 +29689,7 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -29681,11 +29697,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -29730,14 +29746,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -29746,7 +29762,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -30288,7 +30304,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -31159,14 +31175,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -31323,7 +31339,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -31426,12 +31442,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -31711,7 +31727,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; @@ -32115,7 +32131,7 @@ imageSegmentVersion(void) */ /* NewObjectMemory>>#incCompBody */ -static usqInt +static sqInt incCompBody(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToBeFreed; @@ -32240,7 +32256,7 @@ incCompMakeFwd(void) free space bubble up to the end of memory. */ /* NewObjectMemory>>#incCompMove: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToMove; @@ -35477,7 +35493,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -39902,7 +39918,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -40458,7 +40474,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -41300,7 +41316,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -41478,7 +41494,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -42795,7 +42811,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -43387,7 +43403,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -43891,8 +43907,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -44419,7 +44435,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer3 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), rcvr); @@ -44738,7 +44754,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -44925,7 +44941,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -45927,7 +45943,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -46577,7 +46593,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -47049,7 +47065,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -47076,11 +47092,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -47732,6 +47748,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -47745,13 +47762,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -48102,7 +48124,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -48199,7 +48221,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -48410,7 +48432,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -48429,9 +48451,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -48451,22 +48473,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -48474,7 +48496,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -48608,7 +48630,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -48651,7 +48673,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -48771,7 +48793,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -49591,7 +49613,7 @@ primitiveContextAt(void) goto l9; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -49695,7 +49717,7 @@ primitiveContextAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l8; } /* begin positive32BitIntegerFor: */ @@ -49780,8 +49802,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -50133,7 +50155,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -50511,7 +50533,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -50573,7 +50595,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -50902,7 +50924,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -51139,7 +51161,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -51180,7 +51202,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -51270,7 +51292,7 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } /* begin positive32BitIntegerFor: */ @@ -51311,7 +51333,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -51899,7 +51921,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -51914,7 +51936,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -51938,9 +51960,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -51949,7 +51971,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -51961,7 +51983,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -52017,7 +52039,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -52050,7 +52072,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -52105,7 +52127,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -52113,7 +52135,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -52132,12 +52154,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -52149,7 +52171,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -52263,7 +52285,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -52417,16 +52439,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -52436,34 +52458,34 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer13 = getCogCodeSize(); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer13); @@ -52471,7 +52493,7 @@ primitiveVMParameter(void) valuePointer14 = getDesiredCogCodeSize(); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((((((GIV(flagInterpretedMethods) + valuePointer15 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52480,9 +52502,9 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer17 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -52526,15 +52548,15 @@ primitiveVMParameter(void) valuePointer24 = getCodeCompactionMSecs(); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer25 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((((((0) + ((IMMUTABILITY + valuePointer26 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((stackPageByteSize()) << 1) | 1); + valuePointer27 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer27); /* begin storePointer:ofObject:withValue: */ valuePointer28 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -52543,13 +52565,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer29 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer30 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer31 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer31); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -52592,22 +52614,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -52619,43 +52641,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -52663,37 +52685,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -52702,7 +52724,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52711,10 +52733,10 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -52741,27 +52763,27 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -52812,19 +52834,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -52832,7 +52854,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -52843,7 +52865,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52852,7 +52874,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52860,7 +52882,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52869,7 +52891,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52877,7 +52899,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52900,7 +52922,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/src/vm/cointerp.h b/src/vm/cointerp.h index b20488c3f1..6898c5e374 100644 --- a/src/vm/cointerp.h +++ b/src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -82,7 +82,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -275,8 +275,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); diff --git a/src/vm/cointerpmt.c b/src/vm/cointerpmt.c index 29467eb3d3..6e61ae2473 100644 --- a/src/vm/cointerpmt.c +++ b/src/vm/cointerpmt.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreterMT VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreterMT VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -577,7 +577,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -702,7 +702,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -895,7 +896,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); static sqInt successful(void); @@ -1296,7 +1297,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1345,7 +1346,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1388,8 +1389,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1596,7 +1597,7 @@ _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; _iss sqInt traceLog[TraceBufferSize /* 768 */]; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt primTraceLog[256]; _iss sqInt rootTable[RootTableSize + 1 /* 2501 */]; @@ -1605,13 +1606,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; _iss sqInt theUnknownShort; @@ -2243,7 +2244,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2340,7 +2341,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; if (GIV(stackLimit) == 0) { @@ -5082,7 +5083,7 @@ interpret(void) l245: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5108,7 +5109,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l247; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l247: /* end internalQuickPrimitiveResponse */; goto l248; } @@ -5239,7 +5240,7 @@ interpret(void) goto l246; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l246: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5409,7 +5410,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l27; } if (byte3 == InstructionPointerIndex) { @@ -5813,8 +5814,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -6153,7 +6154,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6289,7 +6290,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7268,7 +7269,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7412,7 +7413,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7543,7 +7544,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7651,7 +7652,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l168; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7696,7 +7697,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7880,7 +7881,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l180: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7924,7 +7925,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l182: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -9103,7 +9104,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -9223,7 +9224,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -9306,7 +9307,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -9319,7 +9320,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -9988,7 +9989,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -11195,7 +11196,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -11433,13 +11434,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -11470,8 +11471,8 @@ createClosureNumArgsnumCopiedstartpc(sqInt numArgs, sqInt numCopied, sqInt initi newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -11800,7 +11801,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -12423,7 +12424,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -13171,7 +13172,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -13657,7 +13658,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -13744,7 +13745,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -13753,10 +13754,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -13795,6 +13796,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -14283,7 +14285,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -14435,12 +14437,12 @@ printFrameWithSP(char *theFP, char *theSP) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -14480,7 +14482,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -15041,7 +15043,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -15229,7 +15231,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -15452,7 +15454,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15545,90 +15547,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -15648,14 +15574,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -15972,7 +15898,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -16132,7 +16058,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -16417,7 +16343,7 @@ bindProcesstoId(sqInt aProcess, sqInt newId) threadId1 = GIV(nilObj); } else { - threadId1 = ((((((sqInt)((usqInt)(newId) << 1))) + (1)) << 1) | 1); + threadId1 = (((usqInt)((((sqInt)((usqInt)(newId) << 1))) + (1)) << 1) | 1); } longAtput((aProcess + BaseHeaderSize) + (((int)((usqInt)(ThreadIdIndex) << (shiftForWord())))), threadId1); return 0; @@ -16854,7 +16780,7 @@ disownVM(sqInt flags) if (recordEventTrace()) { /* begin recordTrace:thing:source: */ GIV(traceLog)[GIV(traceLogIndex)] = TraceDisownVM; - GIV(traceLog)[GIV(traceLogIndex) + 1] = (((flags << 1) | 1)); + GIV(traceLog)[GIV(traceLogIndex) + 1] = ((((usqInt)flags << 1) | 1)); GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16))); GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize; } @@ -17041,7 +16967,7 @@ forceInterruptCheckFromHeartbeat(void) static sqInt getCogVMFlags(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - return (((((((((GIV(processHasThreadId) + return (((usqInt)(((((((GIV(processHasThreadId) ? 1 : 0)) + ((GIV(flagInterpretedMethods) ? 2 @@ -17764,7 +17690,7 @@ preemptDisowningThread(void) || (((GIV(disowningVMThread)->state)) == CTMWantingOwnership)); if (recordEventTrace()) { /* begin recordTrace:thing:source: */ - selector = ((((GIV(disowningVMThread)->index)) << 1) | 1); + selector = (((usqInt)((GIV(disowningVMThread)->index)) << 1) | 1); GIV(traceLog)[GIV(traceLogIndex)] = TracePreemptDisowningThread; GIV(traceLog)[GIV(traceLogIndex) + 1] = selector; GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16))); @@ -17825,7 +17751,7 @@ preemptDisowningThread(void) threadId = GIV(nilObj); } else { - threadId = ((((((sqInt)((usqInt)(anIndex) << 1))) + (0)) << 1) | 1); + threadId = (((usqInt)((((sqInt)((usqInt)(anIndex) << 1))) + (0)) << 1) | 1); } longAtput((activeProc + BaseHeaderSize) + (((int)((usqInt)(ThreadIdIndex) << (shiftForWord())))), threadId); } @@ -17918,7 +17844,7 @@ primitiveProcessBoundThreadId(void) /* begin pop:thenPush: */ oop = (id == 0 ? GIV(nilObj) - : ((id << 1) | 1)); + : (((usqInt)id << 1) | 1)); longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -17988,7 +17914,7 @@ primitiveVMCurrentThreadId(void) /* begin pop:thenPushInteger: */ sqLowLevelMFence(); integerVal = GIV(vmOwner); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -18105,7 +18031,7 @@ returnToSchedulingLoopAndReleaseVMOrWakeThreadsource(CogVMThread *vmThread, sqIn : (vmThread->index)); if (recordEventTrace()) { /* begin recordTrace:thing:source: */ - selector = ((((((sqInt)((usqInt)(ownerIndex) << 16))) + (getVMOwner())) << 1) | 1); + selector = (((usqInt)((((sqInt)((usqInt)(ownerIndex) << 16))) + (getVMOwner())) << 1) | 1); GIV(traceLog)[GIV(traceLogIndex)] = TraceThreadSwitch; GIV(traceLog)[GIV(traceLogIndex) + 1] = selector; GIV(traceLog)[GIV(traceLogIndex) + 2] = (source + (((usqInt) (getVMOwner()) << 16))); @@ -18335,7 +18261,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -18978,7 +18904,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -19348,7 +19274,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -19360,7 +19286,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -20356,7 +20282,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20473,7 +20399,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -20764,7 +20690,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -20884,6 +20810,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -20892,7 +20904,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -20933,14 +20945,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -20961,7 +20973,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21488,7 +21500,7 @@ primitiveAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -21543,7 +21555,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -22000,7 +22012,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22042,10 +22054,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22066,25 +22078,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22097,10 +22109,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22121,25 +22133,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22210,10 +22222,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22234,25 +22246,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22265,10 +22277,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22289,25 +22301,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22405,7 +22417,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -22538,10 +22550,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22562,25 +22574,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22592,10 +22604,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22616,25 +22628,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22694,7 +22706,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -22724,7 +22736,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -22983,7 +22995,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -23027,13 +23039,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -23898,7 +23910,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -23929,7 +23941,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -23996,7 +24008,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -24180,7 +24192,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24243,7 +24255,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24545,7 +24557,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26225,10 +26237,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -26244,7 +26256,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -26272,7 +26284,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -26288,7 +26300,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -26369,8 +26381,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -26572,7 +26584,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -26753,7 +26765,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -26836,7 +26848,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26878,7 +26890,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -26886,10 +26898,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -26923,12 +26939,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -26968,7 +26984,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -27209,7 +27225,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -27239,7 +27255,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -27673,7 +27689,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -27702,7 +27718,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -27718,7 +27734,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -27735,7 +27751,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27816,7 +27832,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -27861,8 +27877,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -27930,7 +27946,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -28100,7 +28116,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -28142,7 +28158,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -28150,7 +28166,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -28360,7 +28376,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28650,7 +28666,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -29151,7 +29167,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29468,7 +29484,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29478,7 +29494,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29525,7 +29541,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29535,7 +29551,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29560,7 +29576,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29570,7 +29586,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29605,7 +29621,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -29658,8 +29674,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -30102,7 +30118,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -30230,7 +30246,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -30285,7 +30301,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -30531,7 +30547,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -30975,7 +30991,7 @@ primitiveStringAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -31048,7 +31064,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -31453,7 +31469,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31750,7 +31766,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31909,7 +31925,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -31954,7 +31970,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -32031,7 +32047,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -32062,7 +32078,7 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -32070,11 +32086,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -32119,14 +32135,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -32135,7 +32151,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -32690,7 +32706,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -33561,14 +33577,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -33725,7 +33741,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -33828,12 +33844,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - sqInt cClass; + usqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - sqInt header1; + usqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -34113,7 +34129,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; @@ -37879,7 +37895,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -42179,7 +42195,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -42735,7 +42751,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -43577,7 +43593,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -43755,7 +43771,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -45072,7 +45088,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -45648,7 +45664,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -46152,8 +46168,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -46512,7 +46528,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer3 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), rcvr); @@ -46831,7 +46847,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -47018,7 +47034,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -48020,7 +48036,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -48670,7 +48686,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -49142,7 +49158,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -49169,11 +49185,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -49825,6 +49841,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -49838,13 +49855,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -50195,7 +50217,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -50292,7 +50314,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -50503,7 +50525,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -50522,9 +50544,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -50544,22 +50566,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -50567,7 +50589,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -50701,7 +50723,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -50744,7 +50766,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -50864,7 +50886,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -51622,7 +51644,7 @@ primitiveContextAt(void) goto l9; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -51726,7 +51748,7 @@ primitiveContextAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l8; } /* begin positive32BitIntegerFor: */ @@ -51811,8 +51833,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -52164,7 +52186,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -52542,7 +52564,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -52604,7 +52626,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -52933,7 +52955,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -53170,7 +53192,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -53211,7 +53233,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -53301,7 +53323,7 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } /* begin positive32BitIntegerFor: */ @@ -53342,7 +53364,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -53930,7 +53952,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -53945,7 +53967,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -53969,9 +53991,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -53980,7 +54002,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -53992,7 +54014,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -54048,7 +54070,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -54081,7 +54103,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -54136,7 +54158,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -54144,7 +54166,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -54163,12 +54185,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -54180,7 +54202,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -54294,7 +54316,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -54448,16 +54470,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -54467,34 +54489,34 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer13 = getCogCodeSize(); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer13); @@ -54505,9 +54527,9 @@ primitiveVMParameter(void) valuePointer15 = getCogVMFlags(); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer17 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -54551,15 +54573,15 @@ primitiveVMParameter(void) valuePointer24 = getCodeCompactionMSecs(); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer25 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((((((0) + ((IMMUTABILITY + valuePointer26 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((stackPageByteSize()) << 1) | 1); + valuePointer27 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer27); /* begin storePointer:ofObject:withValue: */ valuePointer28 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -54568,13 +54590,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer29 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer30 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer31 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer31); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -54617,22 +54639,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -54644,43 +54666,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -54688,37 +54710,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -54730,10 +54752,10 @@ primitiveVMParameter(void) result = getCogVMFlags(); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -54760,27 +54782,27 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -54831,19 +54853,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -54851,7 +54873,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -54862,7 +54884,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54871,7 +54893,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54879,7 +54901,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54888,7 +54910,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54896,7 +54918,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((getCogVMFlags()) << 1) | 1); + result = (((usqInt)(getCogVMFlags()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setCogVMFlags: */ @@ -54915,7 +54937,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/src/vm/cointerpmt.h b/src/vm/cointerpmt.h index 43c63a360a..b510e6a77d 100644 --- a/src/vm/cointerpmt.h +++ b/src/vm/cointerpmt.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1986 uuid: e06214fe-0e06-4c33-9132-03ffe9351cbb */ @@ -83,7 +83,7 @@ extern usqInt newMethodAddress(void); extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); extern sqInt primErrTable(void); @@ -279,8 +279,8 @@ extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); extern sqInt specialSelector(sqInt index); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); diff --git a/src/vm/gcc3x-cointerp.c b/src/vm/gcc3x-cointerp.c index 68398fccdd..f91ba6fe3f 100644 --- a/src/vm/gcc3x-cointerp.c +++ b/src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -524,7 +524,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -619,7 +619,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -813,7 +814,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -858,9 +859,9 @@ extern void fullGC(void); static usqInt NoDbgRegParms fwdTableInit(sqInt blkSize); static usqInt NoDbgRegParms fwdTableSize(sqInt blkSize); static usqInt imageSegmentVersion(void); -static usqInt incCompBody(void); +static sqInt incCompBody(void); static sqInt incCompMakeFwd(void); -static usqInt NoDbgRegParms incCompMove(sqInt bytesFreed); +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed); extern void incrementalGC(void); static void NoDbgRegParms initializeMemoryFirstFree(sqInt firstFree); static void NoDbgRegParms initializeObjectMemory(sqInt bytesToShift); @@ -1217,7 +1218,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1266,7 +1267,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1309,8 +1310,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1501,7 +1502,7 @@ _iss usqLong longRunningPrimitiveGCUsecs; _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt primTraceLog[256]; @@ -1511,13 +1512,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; _iss sqInt theUnknownShort; @@ -2148,7 +2149,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2243,7 +2244,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -4991,7 +4992,7 @@ interpret(void) l245: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5017,7 +5018,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l247; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l247: /* end internalQuickPrimitiveResponse */; goto l248; } @@ -5148,7 +5149,7 @@ interpret(void) goto l246; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l246: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5318,7 +5319,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l27; } if (byte3 == InstructionPointerIndex) { @@ -5722,8 +5723,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -6062,7 +6063,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6198,7 +6199,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7177,7 +7178,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7321,7 +7322,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7452,7 +7453,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7560,7 +7561,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l168; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7605,7 +7606,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7789,7 +7790,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l180: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7833,7 +7834,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l182: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -8645,7 +8646,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -8765,7 +8766,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -8848,7 +8849,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -8861,7 +8862,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -9530,7 +9531,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -10737,7 +10738,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -10975,13 +10976,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -11012,8 +11013,8 @@ createClosureNumArgsnumCopiedstartpc(sqInt numArgs, sqInt numCopied, sqInt initi newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -11399,7 +11400,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -12061,7 +12062,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -12809,7 +12810,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -13295,7 +13296,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -13382,7 +13383,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -13391,10 +13392,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -13433,6 +13434,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -14142,12 +14144,12 @@ printLogEntryAt(sqInt i) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -14187,7 +14189,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -14738,7 +14740,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -14926,7 +14928,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -15159,7 +15161,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15386,7 +15388,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15479,90 +15481,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -15582,14 +15508,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -15906,7 +15832,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -16222,7 +16148,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -16556,7 +16482,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -16926,7 +16852,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -16938,7 +16864,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -17934,7 +17860,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -18051,7 +17977,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -18342,7 +18268,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -18462,6 +18388,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -18470,7 +18482,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -18511,14 +18523,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -18539,7 +18551,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19066,7 +19078,7 @@ primitiveAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -19121,7 +19133,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -19578,7 +19590,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -19620,10 +19632,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19644,25 +19656,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -19675,10 +19687,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19699,25 +19711,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -19788,10 +19800,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19812,25 +19824,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -19843,10 +19855,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -19867,25 +19879,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -19983,7 +19995,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -20116,10 +20128,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -20140,25 +20152,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -20170,10 +20182,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -20194,25 +20206,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -20272,7 +20284,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -20302,7 +20314,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -20561,7 +20573,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -20605,13 +20617,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -21476,7 +21488,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -21507,7 +21519,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -21574,7 +21586,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -21758,7 +21770,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21821,7 +21833,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22123,7 +22135,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -23803,10 +23815,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -23822,7 +23834,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23850,7 +23862,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -23866,7 +23878,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -23947,8 +23959,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -24150,7 +24162,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -24331,7 +24343,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -24414,7 +24426,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24456,7 +24468,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -24464,10 +24476,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -24501,12 +24517,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -24546,7 +24562,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -24787,7 +24803,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -24817,7 +24833,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -25251,7 +25267,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -25280,7 +25296,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -25296,7 +25312,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -25313,7 +25329,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -25394,7 +25410,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -25439,8 +25455,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -25508,7 +25524,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -25678,7 +25694,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -25720,7 +25736,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -25728,7 +25744,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -25938,7 +25954,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26228,7 +26244,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -26729,7 +26745,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27088,7 +27104,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27098,7 +27114,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27145,7 +27161,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27155,7 +27171,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27180,7 +27196,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -27190,7 +27206,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -27225,7 +27241,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -27278,8 +27294,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -27722,7 +27738,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -27850,7 +27866,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -27905,7 +27921,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -28151,7 +28167,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -28595,7 +28611,7 @@ primitiveStringAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -28668,7 +28684,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -29073,7 +29089,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29370,7 +29386,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29529,7 +29545,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -29574,7 +29590,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -29651,7 +29667,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -29682,7 +29698,7 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -29690,11 +29706,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -29739,14 +29755,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -29755,7 +29771,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -30297,7 +30313,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -31168,14 +31184,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -31332,7 +31348,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -31435,12 +31451,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -31720,7 +31736,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; @@ -32124,7 +32140,7 @@ imageSegmentVersion(void) */ /* NewObjectMemory>>#incCompBody */ -static usqInt +static sqInt incCompBody(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToBeFreed; @@ -32249,7 +32265,7 @@ incCompMakeFwd(void) free space bubble up to the end of memory. */ /* NewObjectMemory>>#incCompMove: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToMove; @@ -35486,7 +35502,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -39911,7 +39927,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -40467,7 +40483,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -41309,7 +41325,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -41487,7 +41503,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -42804,7 +42820,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -43396,7 +43412,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -43900,8 +43916,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -44428,7 +44444,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer3 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), rcvr); @@ -44747,7 +44763,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -44934,7 +44950,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -45936,7 +45952,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -46586,7 +46602,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -47058,7 +47074,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -47085,11 +47101,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -47741,6 +47757,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -47754,13 +47771,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -48111,7 +48133,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -48208,7 +48230,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -48419,7 +48441,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -48438,9 +48460,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -48460,22 +48482,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -48483,7 +48505,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -48617,7 +48639,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -48660,7 +48682,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -48780,7 +48802,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -49600,7 +49622,7 @@ primitiveContextAt(void) goto l9; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -49704,7 +49726,7 @@ primitiveContextAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l8; } /* begin positive32BitIntegerFor: */ @@ -49789,8 +49811,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -50142,7 +50164,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -50520,7 +50542,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -50582,7 +50604,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -50911,7 +50933,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -51148,7 +51170,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -51189,7 +51211,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -51279,7 +51301,7 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } /* begin positive32BitIntegerFor: */ @@ -51320,7 +51342,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -51908,7 +51930,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -51923,7 +51945,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -51947,9 +51969,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -51958,7 +51980,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -51970,7 +51992,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -52026,7 +52048,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -52059,7 +52081,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -52114,7 +52136,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -52122,7 +52144,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -52141,12 +52163,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -52158,7 +52180,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -52272,7 +52294,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -52426,16 +52448,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -52445,34 +52467,34 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer13 = getCogCodeSize(); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer13); @@ -52480,7 +52502,7 @@ primitiveVMParameter(void) valuePointer14 = getDesiredCogCodeSize(); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((((((GIV(flagInterpretedMethods) + valuePointer15 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52489,9 +52511,9 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer17 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -52535,15 +52557,15 @@ primitiveVMParameter(void) valuePointer24 = getCodeCompactionMSecs(); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer25 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((((((0) + ((IMMUTABILITY + valuePointer26 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((stackPageByteSize()) << 1) | 1); + valuePointer27 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer27); /* begin storePointer:ofObject:withValue: */ valuePointer28 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -52552,13 +52574,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer29 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer30 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer31 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer31); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -52601,22 +52623,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -52628,43 +52650,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -52672,37 +52694,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -52711,7 +52733,7 @@ primitiveVMParameter(void) result = getDesiredCogCodeSize(); } if (arg == 48) { - result = (((((((GIV(flagInterpretedMethods) + result = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52720,10 +52742,10 @@ primitiveVMParameter(void) : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -52750,27 +52772,27 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -52821,19 +52843,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -52841,7 +52863,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -52852,7 +52874,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52861,7 +52883,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52869,7 +52891,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52878,7 +52900,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -52886,7 +52908,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = ((((((((((GIV(flagInterpretedMethods) + result = (((usqInt)((((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -52909,7 +52931,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/src/vm/gcc3x-cointerpmt.c b/src/vm/gcc3x-cointerpmt.c index 0d8a2a39c5..5be604a14c 100644 --- a/src/vm/gcc3x-cointerpmt.c +++ b/src/vm/gcc3x-cointerpmt.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - CoInterpreterMT VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CoInterpreterMT VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -580,7 +580,7 @@ static sqInt NoDbgRegParms newMethodInLookupCacheAtand(sqInt selector, sqInt cla extern usqInt nextProfileTickAddress(void); extern sqInt noAssertHeaderOf(sqInt methodPointer); extern sqInt positive32BitIntegerFor(unsigned int integerValue); -extern usqInt positive32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern sqInt positive64BitIntegerFor(usqLong integerValue); extern usqLong positive64BitValueOf(sqInt oop); static void NoDbgRegParms postGCAction(sqInt gcModeArg); @@ -705,7 +705,8 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -898,7 +899,7 @@ EXPORT(sqInt) primitiveUtcWithOffset(void); static void primitiveVMPath(void); static void primitiveVMProfileSamplesInto(void); extern sqInt signalNoResume(sqInt aSemaphore); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); static sqInt successful(void); @@ -1299,7 +1300,7 @@ extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1348,7 +1349,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1391,8 +1392,8 @@ extern sqInt stackObjectValue(sqInt offset); static sqInt stackPageByteSize(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1599,7 +1600,7 @@ _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; _iss sqInt traceLog[TraceBufferSize /* 768 */]; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt primTraceLog[256]; _iss sqInt rootTable[RootTableSize + 1 /* 2501 */]; @@ -1608,13 +1609,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; _iss sqInt theUnknownShort; @@ -2246,7 +2247,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-nice.1989]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2343,7 +2344,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; char *theStackMemory; JUMP_TABLE; @@ -5091,7 +5092,7 @@ interpret(void) l245: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -5117,7 +5118,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l247; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l247: /* end internalQuickPrimitiveResponse */; goto l248; } @@ -5248,7 +5249,7 @@ interpret(void) goto l246; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l246: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -5418,7 +5419,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l27; } if (byte3 == InstructionPointerIndex) { @@ -5822,8 +5823,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -6162,7 +6163,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6298,7 +6299,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7277,7 +7278,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -7421,7 +7422,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7552,7 +7553,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7660,7 +7661,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l168; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7705,7 +7706,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7889,7 +7890,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l180: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7933,7 +7934,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l182: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -9112,7 +9113,7 @@ activateCoggedNewMethod(sqInt inInterpreter) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -9232,7 +9233,7 @@ activateNewMethod(void) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -9315,7 +9316,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -9328,7 +9329,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -9997,7 +9998,7 @@ ceCannotAssignTowithIndexvalueToAssign(sqInt immutableObject, sqInt index, sqInt longAtput((sp1 = GIV(stackPointer) - BytesPerWord), valueToAssign); GIV(stackPointer) = sp1; /* begin push: */ - longAtput((sp2 = GIV(stackPointer) - BytesPerWord), ((index << 1) | 1)); + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), (((usqInt)index << 1) | 1)); GIV(stackPointer) = sp2; /* begin push: */ longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); @@ -11204,7 +11205,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -11442,13 +11443,13 @@ contextInstructionPointerframe(sqInt theIP, char *theFP) return HasBeenReturnedFromMCPCOop; } if (((cogMethod->cmType)) == CMMethod) { - return ((((((sqInt)cogMethod)) - theIP) << 1) | 1); + return (((usqInt)((((sqInt)cogMethod)) - theIP) << 1) | 1); } homeMethod = ((CogMethod *) ((((usqInt)cogMethod)) - ((cogMethod->homeOffset)))); blockOffset = ((((sqInt)homeMethod)) - (((sqInt)cogMethod))) / (blockAlignment()); - return ((((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); + return (((usqInt)((((usqInt) blockOffset << 16)) | (((((sqInt)cogMethod)) - theIP) & 0xFFFF)) << 1) | 1); } - return (((((((theIP == (ceReturnToInterpreterPC()) + return (((usqInt)(((((theIP == (ceReturnToInterpreterPC()) ? longAt(theFP + FoxIFSavedIP) : theIP)) - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -11479,8 +11480,8 @@ createClosureNumArgsnumCopiedstartpc(sqInt numArgs, sqInt numCopied, sqInt initi newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (recordSendTrace()) { /* begin recordTrace:thing:source: */ @@ -11809,7 +11810,7 @@ executeNewMethod(void) inInterpreter = GIV(instructionPointer) >= (startOfMemory()); if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); returntoExecutive(popStack(), inInterpreter); return null; @@ -12432,7 +12433,7 @@ interpretMethodFromMachineCode(void) assert((GIV(framePointer) < ((GIV(stackPage)->baseAddress))) && (GIV(framePointer) > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); (GIV(stackPage)->headFP = GIV(framePointer)); - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(primFailCode) = 0; } @@ -13180,7 +13181,7 @@ maybeFlagMethodAsInterpreted(sqInt aMethod) realHeader = (isCogMethodReference(rawHeader) ? ((((CogMethod *) rawHeader))->methodHeader) : rawHeader); - realHeader = realHeader | ((((1U << MethodHeaderFlagBitPosition) << 1) | 1)); + realHeader = realHeader | ((((usqInt)(1U << MethodHeaderFlagBitPosition) << 1) | 1)); if (isCogMethodReference(rawHeader)) { ((((CogMethod *) rawHeader))->methodHeader = realHeader); } @@ -13666,7 +13667,7 @@ mustMapMachineCodePCcontext(sqInt theIP, sqInt aOnceMarriedContext) && (methodHeaderHasPrimitive((cogMethod->methodHeader))))) { bcpc += sizeOfCallPrimitiveBytecode((cogMethod->methodHeader)); } - return (((bcpc + 1) << 1) | 1); + return (((usqInt)(bcpc + 1) << 1) | 1); } /* CoInterpreter>>#newMethodAddress */ @@ -13753,7 +13754,7 @@ positive32BitIntegerFor(unsigned int integerValue) */ /* CoInterpreter>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -13762,10 +13763,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -13804,6 +13805,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -14292,7 +14294,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -14444,12 +14446,12 @@ printFrameWithSP(char *theFP, char *theSP) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -14489,7 +14491,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -15050,7 +15052,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea void reportMinimumUnusedHeadroom(void) { - printf("stack page bytes %ld available headroom %ld minimum unused headroom %ld\n", ((long)(stackPageByteSize())), ((long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((long)(minimumUnusedHeadroom()))); + printf("stack page bytes %lld available headroom %lld minimum unused headroom %lld\n", ((unsigned long long)(stackPageByteSize())), ((unsigned long long)(((stackPageByteSize()) - ((((stackPageFrameBytes()) < (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))) ? (stackPageFrameBytes()) : (((stackPageByteSize()) - ((IFrameSlots + 64) * BytesPerWord)) - (osCogStackPageHeadroom()))))) - ((IFrameSlots + 64) * BytesPerWord))), ((unsigned long long)(minimumUnusedHeadroom()))); } @@ -15238,7 +15240,7 @@ rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(v : localPrimAddress)); } if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -15461,7 +15463,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15554,90 +15556,14 @@ signed32BitIntegerFor(sqInt integerValue) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* CoInterpreter>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -15657,14 +15583,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -15981,7 +15907,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -16141,7 +16067,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -16426,7 +16352,7 @@ bindProcesstoId(sqInt aProcess, sqInt newId) threadId1 = GIV(nilObj); } else { - threadId1 = ((((((sqInt)((usqInt)(newId) << 1))) + (1)) << 1) | 1); + threadId1 = (((usqInt)((((sqInt)((usqInt)(newId) << 1))) + (1)) << 1) | 1); } longAtput((aProcess + BaseHeaderSize) + (((int)((usqInt)(ThreadIdIndex) << (shiftForWord())))), threadId1); return 0; @@ -16863,7 +16789,7 @@ disownVM(sqInt flags) if (recordEventTrace()) { /* begin recordTrace:thing:source: */ GIV(traceLog)[GIV(traceLogIndex)] = TraceDisownVM; - GIV(traceLog)[GIV(traceLogIndex) + 1] = (((flags << 1) | 1)); + GIV(traceLog)[GIV(traceLogIndex) + 1] = ((((usqInt)flags << 1) | 1)); GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16))); GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize; } @@ -17050,7 +16976,7 @@ forceInterruptCheckFromHeartbeat(void) static sqInt getCogVMFlags(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - return (((((((((GIV(processHasThreadId) + return (((usqInt)(((((((GIV(processHasThreadId) ? 1 : 0)) + ((GIV(flagInterpretedMethods) ? 2 @@ -17773,7 +17699,7 @@ preemptDisowningThread(void) || (((GIV(disowningVMThread)->state)) == CTMWantingOwnership)); if (recordEventTrace()) { /* begin recordTrace:thing:source: */ - selector = ((((GIV(disowningVMThread)->index)) << 1) | 1); + selector = (((usqInt)((GIV(disowningVMThread)->index)) << 1) | 1); GIV(traceLog)[GIV(traceLogIndex)] = TracePreemptDisowningThread; GIV(traceLog)[GIV(traceLogIndex) + 1] = selector; GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16))); @@ -17834,7 +17760,7 @@ preemptDisowningThread(void) threadId = GIV(nilObj); } else { - threadId = ((((((sqInt)((usqInt)(anIndex) << 1))) + (0)) << 1) | 1); + threadId = (((usqInt)((((sqInt)((usqInt)(anIndex) << 1))) + (0)) << 1) | 1); } longAtput((activeProc + BaseHeaderSize) + (((int)((usqInt)(ThreadIdIndex) << (shiftForWord())))), threadId); } @@ -17927,7 +17853,7 @@ primitiveProcessBoundThreadId(void) /* begin pop:thenPush: */ oop = (id == 0 ? GIV(nilObj) - : ((id << 1) | 1)); + : (((usqInt)id << 1) | 1)); longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -17997,7 +17923,7 @@ primitiveVMCurrentThreadId(void) /* begin pop:thenPushInteger: */ sqLowLevelMFence(); integerVal = GIV(vmOwner); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -18114,7 +18040,7 @@ returnToSchedulingLoopAndReleaseVMOrWakeThreadsource(CogVMThread *vmThread, sqIn : (vmThread->index)); if (recordEventTrace()) { /* begin recordTrace:thing:source: */ - selector = ((((((sqInt)((usqInt)(ownerIndex) << 16))) + (getVMOwner())) << 1) | 1); + selector = (((usqInt)((((sqInt)((usqInt)(ownerIndex) << 16))) + (getVMOwner())) << 1) | 1); GIV(traceLog)[GIV(traceLogIndex)] = TraceThreadSwitch; GIV(traceLog)[GIV(traceLogIndex) + 1] = selector; GIV(traceLog)[GIV(traceLogIndex) + 2] = (source + (((usqInt) (getVMOwner()) << 16))); @@ -18344,7 +18270,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -18987,7 +18913,7 @@ primitiveContextXray(void) flags = flags | 16; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -19357,7 +19283,7 @@ primitiveMethodXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -19369,7 +19295,7 @@ primitiveMinimumUnusedHeadroom(void) char *sp; /* begin methodReturnValue: */ - oop = (((minimumUnusedHeadroom()) << 1) | 1); + oop = (((usqInt)(minimumUnusedHeadroom()) << 1) | 1); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -20365,7 +20291,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20482,7 +20408,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; structStackPageSize = sizeof(CogStackPage); @@ -20773,7 +20699,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -20893,6 +20819,92 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Answer a value of an integer in address range, i.e up to the size of a machine word. The object may be either a positive SmallInteger or a LargePositiveInteger @@ -20901,7 +20913,7 @@ magnitude64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -20942,14 +20954,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -20970,7 +20982,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -21497,7 +21509,7 @@ primitiveAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -21552,7 +21564,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -22009,7 +22021,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -22051,10 +22063,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22075,25 +22087,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22106,10 +22118,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22130,25 +22142,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22219,10 +22231,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22243,25 +22255,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22274,10 +22286,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22298,25 +22310,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22414,7 +22426,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -22547,10 +22559,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22571,25 +22583,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -22601,10 +22613,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -22625,25 +22637,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -22703,7 +22715,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -22733,7 +22745,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -22992,7 +23004,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -23036,13 +23048,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -23907,7 +23919,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -23938,7 +23950,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -24005,7 +24017,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -24189,7 +24201,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24252,7 +24264,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -24554,7 +24566,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26234,10 +26246,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -26253,7 +26265,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -26281,7 +26293,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -26297,7 +26309,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -26378,8 +26390,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -26581,7 +26593,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -26762,7 +26774,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -26845,7 +26857,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -26887,7 +26899,7 @@ primitiveIntegerAtPut(void) /* begin checkedIntegerValueOf: */ if ((integerPointer & 1)) { index = (integerPointer >> 1); - goto l2; + goto l3; } else { /* begin primitiveFail */ @@ -26895,10 +26907,14 @@ primitiveIntegerAtPut(void) GIV(primFailCode) = 1; } index = 0; - goto l2; + goto l3; } -l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); +l3: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l1; + +l1: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -26932,12 +26948,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -26977,7 +26993,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -27218,7 +27234,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -27248,7 +27264,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -27682,7 +27698,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -27711,7 +27727,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -27727,7 +27743,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -27744,7 +27760,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -27825,7 +27841,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -27870,8 +27886,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -27939,7 +27955,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -28109,7 +28125,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -28151,7 +28167,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -28159,7 +28175,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -28369,7 +28385,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -28659,7 +28675,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)(GIV(stackBasePlus1) - 1)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -29160,7 +29176,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -29477,7 +29493,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29487,7 +29503,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29534,7 +29550,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29544,7 +29560,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29569,7 +29585,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -29579,7 +29595,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -29614,7 +29630,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -29667,8 +29683,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -30111,7 +30127,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -30239,7 +30255,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -30294,7 +30310,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -30540,7 +30556,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -30984,7 +31000,7 @@ primitiveStringAt(void) goto l7; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l7; } /* begin positive32BitIntegerFor: */ @@ -31057,7 +31073,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -31462,7 +31478,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31759,7 +31775,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -31918,7 +31934,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -31963,7 +31979,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -32040,7 +32056,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -32071,7 +32087,7 @@ signalNoResume(sqInt aSemaphore) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -32079,11 +32095,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -32128,14 +32144,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -32144,7 +32160,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -32699,7 +32715,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -33570,14 +33586,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -33734,7 +33750,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -33837,12 +33853,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - sqInt cClass; + usqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - sqInt header1; + usqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -34122,7 +34138,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; @@ -37888,7 +37904,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -42188,7 +42204,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -42744,7 +42760,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -43586,7 +43602,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -43764,7 +43780,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -45081,7 +45097,7 @@ isNullExternalPrimitiveCall(sqInt aMethodObj) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -45657,7 +45673,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -46161,8 +46177,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -46521,7 +46537,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer3 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer3); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), methodFieldOrObj); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), rcvr); @@ -46840,7 +46856,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -47027,7 +47043,7 @@ popthenPush(sqInt nItems, sqInt oop) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -48029,7 +48045,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -48679,7 +48695,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -49151,7 +49167,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -49178,11 +49194,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -49834,6 +49850,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -49847,13 +49864,18 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { - if (isMachineCodeFrame((theFP = frameOfMarriedContext(aContext)))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + if ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())) { print(" M ("); } else { print(" I ("); } - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -50204,7 +50226,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -50301,7 +50323,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -50512,7 +50534,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -50531,9 +50553,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -50553,22 +50575,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -50576,7 +50598,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -50710,7 +50732,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -50753,7 +50775,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -50873,7 +50895,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -51631,7 +51653,7 @@ primitiveContextAt(void) goto l9; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -51735,7 +51757,7 @@ primitiveContextAt(void) goto l8; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l8; } /* begin positive32BitIntegerFor: */ @@ -51820,8 +51842,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -52173,7 +52195,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -52551,7 +52573,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -52613,7 +52635,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -52942,7 +52964,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -53179,7 +53201,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -53220,7 +53242,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -53310,7 +53332,7 @@ primitiveInstVarAt(void) goto l2; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l2; } /* begin positive32BitIntegerFor: */ @@ -53351,7 +53373,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -53939,7 +53961,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -53954,7 +53976,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -53978,9 +54000,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -53989,7 +54011,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -54001,7 +54023,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -54057,7 +54079,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -54090,7 +54112,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -54145,7 +54167,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -54153,7 +54175,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -54172,12 +54194,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -54189,7 +54211,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -54303,7 +54325,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); ensureContextIsExecutionSafeAfterAssignToStackPointer(ctxt); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; @@ -54457,16 +54479,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -54476,34 +54498,34 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer13 = getCogCodeSize(); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer13); @@ -54514,9 +54536,9 @@ primitiveVMParameter(void) valuePointer15 = getCogVMFlags(); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer15); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer16 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer16); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer17 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -54560,15 +54582,15 @@ primitiveVMParameter(void) valuePointer24 = getCodeCompactionMSecs(); longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer25 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((((((0) + ((IMMUTABILITY + valuePointer26 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = (((stackPageByteSize()) << 1) | 1); + valuePointer27 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer27); /* begin storePointer:ofObject:withValue: */ valuePointer28 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -54577,13 +54599,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer29 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer30 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer31 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer31); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -54626,22 +54648,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -54653,43 +54675,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -54697,37 +54719,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = getCogCodeSize(); @@ -54739,10 +54761,10 @@ primitiveVMParameter(void) result = getCogVMFlags(); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -54769,27 +54791,27 @@ primitiveVMParameter(void) result = getCodeCompactionMSecs(); } if (arg == 64) { - result = (((numMethodsOfType(CMMethod)) << 1) | 1); + result = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -54840,19 +54862,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -54860,7 +54882,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -54871,7 +54893,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54880,7 +54902,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54888,7 +54910,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54897,7 +54919,7 @@ primitiveVMParameter(void) if ((index == 47) && (1)) { if (arg >= 0) { - result = (((getDesiredCogCodeSize()) << 1) | 1); + result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); setDesiredCogCodeSize(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -54905,7 +54927,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((getCogVMFlags()) << 1) | 1); + result = (((usqInt)(getCogVMFlags()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setCogVMFlags: */ @@ -54924,7 +54946,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/src/vm/vmCallback.h b/src/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/src/vm/vmCallback.h +++ b/src/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/stacksrc/vm/gcc3x-interp.c b/stacksrc/vm/gcc3x-interp.c index d7e19d86e4..f670d79f72 100644 --- a/stacksrc/vm/gcc3x-interp.c +++ b/stacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -351,9 +351,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -561,7 +562,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -910,7 +911,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -972,7 +972,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1023,7 +1023,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1077,8 +1077,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1273,7 +1273,7 @@ _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt rootTable[RootTableSize + 1 /* 2501 */]; @@ -1282,13 +1282,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; #undef _iss @@ -1913,7 +1913,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -1982,7 +1982,7 @@ interpret(void) sqInt localReturnValue; register char* localSP SP_REG; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; JUMP_TABLE; @@ -4629,7 +4629,7 @@ interpret(void) l270: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -4655,7 +4655,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l267; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l267: /* end internalQuickPrimitiveResponse */; goto l268; } @@ -4740,7 +4740,7 @@ interpret(void) goto l265; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l265: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -4869,7 +4869,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l33; } if (byte3 == InstructionPointerIndex) { @@ -5263,8 +5263,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -5559,7 +5559,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -5693,7 +5693,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6670,7 +6670,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -6812,7 +6812,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6941,7 +6941,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7046,7 +7046,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l162; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7090,7 +7090,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7360,7 +7360,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l174; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7395,7 +7395,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l174; } } @@ -7454,7 +7454,7 @@ interpret(void) sqInt sz2; sqInt totalLength; sqInt totalLength1; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -7752,7 +7752,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l205: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7796,7 +7796,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l207: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -8716,7 +8716,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -8836,13 +8836,99 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -8851,10 +8937,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -8893,6 +8979,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -8969,7 +9056,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -9010,14 +9097,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -9038,7 +9125,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -9568,7 +9655,7 @@ primitiveAt(void) goto l9; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -9621,7 +9708,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -10078,7 +10165,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -10120,10 +10207,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10144,25 +10231,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10175,10 +10262,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10199,25 +10286,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10288,10 +10375,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10312,25 +10399,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10343,10 +10430,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10367,25 +10454,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10483,7 +10570,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -10616,10 +10703,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10640,25 +10727,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10670,10 +10757,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10694,25 +10781,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10772,7 +10859,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -10802,7 +10889,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -11066,7 +11153,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -11110,13 +11197,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -11567,7 +11654,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -11598,7 +11685,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -11665,7 +11752,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -11849,7 +11936,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -11912,7 +11999,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -12309,7 +12396,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -13987,10 +14074,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -14006,7 +14093,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -14034,7 +14121,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -14050,7 +14137,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -14131,8 +14218,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -14334,7 +14421,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -14515,7 +14602,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -14598,7 +14685,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -14651,7 +14738,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -14685,12 +14776,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -14730,7 +14821,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -14847,7 +14938,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l8; } @@ -14930,7 +15021,7 @@ primitiveInvokeObjectAsMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15083,7 +15174,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -15113,7 +15204,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -15547,7 +15638,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -15576,7 +15667,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -15592,7 +15683,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -15609,7 +15700,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15690,7 +15781,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -15735,8 +15826,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -15804,7 +15895,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -15974,7 +16065,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -16016,7 +16107,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -16024,7 +16115,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -16234,7 +16325,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -16610,7 +16701,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -16812,7 +16903,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -16895,7 +16986,7 @@ primitivePerformInSuperclass(void) goto l9; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l9: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -17025,7 +17116,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -17108,7 +17199,7 @@ primitivePerformWithArgs(void) goto l9; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l9: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -17336,7 +17427,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17723,7 +17814,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17733,7 +17824,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17780,7 +17871,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17790,7 +17881,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17815,7 +17906,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17825,7 +17916,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17860,7 +17951,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -17913,8 +18004,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -18357,7 +18448,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -18485,7 +18576,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -18540,7 +18631,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -18797,7 +18888,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -19263,7 +19354,7 @@ primitiveStringAt(void) goto l9; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -19334,7 +19425,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -19739,7 +19830,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20139,7 +20230,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20298,7 +20389,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -20343,7 +20434,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -20420,7 +20511,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -20440,7 +20531,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20511,90 +20602,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -20700,7 +20715,7 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -20708,11 +20723,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -20757,14 +20772,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -20773,7 +20788,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -20882,7 +20897,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -21160,7 +21175,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -26136,7 +26151,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -29907,7 +29922,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -29920,7 +29935,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -30718,7 +30733,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -31108,7 +31123,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return pc == encodedip; } @@ -31350,7 +31365,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -31440,7 +31455,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); if (calleeContext != null) { @@ -31928,7 +31943,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(ctxt, GIV(youngStart))) { @@ -32146,7 +32161,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -32306,7 +32321,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -33400,7 +33415,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -33612,18 +33627,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -33641,7 +33644,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -34199,7 +34202,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -34715,8 +34718,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -35187,7 +35190,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -35312,7 +35315,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer2 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), longAt(theFP + FoxReceiver)); @@ -35673,7 +35676,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -35919,7 +35922,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -36930,7 +36933,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -37164,12 +37167,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -37200,7 +37203,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -37659,7 +37662,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -38125,7 +38128,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -38152,11 +38155,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -39039,7 +39042,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -39226,7 +39229,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -39384,7 +39387,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -39549,6 +39552,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -39562,9 +39566,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -39799,14 +39808,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -39997,7 +40006,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -40065,7 +40074,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -40317,7 +40326,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -40336,9 +40345,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -40358,22 +40367,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -40381,7 +40390,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -40515,7 +40524,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -40558,7 +40567,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -40678,7 +40687,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -40861,7 +40870,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -41092,7 +41101,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -41702,8 +41711,8 @@ primitiveClosureCopyWithCopiedValues(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))), longAt((copiedValues + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))); @@ -41850,7 +41859,7 @@ primitiveContextAt(void) goto l13; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l13; } /* begin positive32BitIntegerFor: */ @@ -41952,7 +41961,7 @@ primitiveContextAt(void) goto l3; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l3; } /* begin positive32BitIntegerFor: */ @@ -42033,8 +42042,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -42379,7 +42388,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -42415,7 +42424,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -42786,7 +42795,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -42828,7 +42837,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -42900,7 +42909,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -42983,7 +42992,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -43089,7 +43098,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -43172,7 +43181,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -43354,7 +43363,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -43629,7 +43638,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -43670,7 +43679,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -43760,7 +43769,7 @@ primitiveInstVarAt(void) goto l1; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l1; } /* begin positive32BitIntegerFor: */ @@ -43802,7 +43811,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -44195,7 +44204,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -44278,7 +44287,7 @@ primitivePerform(void) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -44532,7 +44541,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -44547,7 +44556,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -44571,9 +44580,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -44582,7 +44591,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -44594,7 +44603,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -44650,7 +44659,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -44683,7 +44692,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -44738,7 +44747,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -44746,7 +44755,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -44765,12 +44774,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -44782,7 +44791,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -44895,7 +44904,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -45347,16 +45356,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -45366,47 +45375,47 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = ((((((GIV(preemptionYields) + valuePointer13 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer14 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer14); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer15 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -45447,12 +45456,12 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), GIV(nilObj)); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((((((0) + ((IMMUTABILITY + valuePointer21 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((stackPageByteSize()) << 1) | 1); + valuePointer22 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer22); /* begin storePointer:ofObject:withValue: */ valuePointer23 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -45461,13 +45470,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer24 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer25 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer26 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer26); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -45510,22 +45519,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -45537,43 +45546,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -45581,37 +45590,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -45620,17 +45629,17 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -45660,24 +45669,24 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -45728,19 +45737,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -45748,7 +45757,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -45759,7 +45768,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45768,7 +45777,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45776,7 +45785,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45784,7 +45793,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -45804,7 +45813,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/stacksrc/vm/interp.c b/stacksrc/vm/interp.c index af88ff2ce8..70f202b6d8 100644 --- a/stacksrc/vm/interp.c +++ b/stacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 from - StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 + StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1976 uuid: 21cb3e48-ac24-420a-9d0d-75f4b84ce1c9 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-nice.1989 uuid: 7e63fa13-3564-4b1b-8c0b-31378a87bc74 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -348,9 +348,10 @@ extern sqInt failed(void); static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); -extern usqInt positive32BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); extern usqLong positive64BitValueOf(sqInt oop); -extern unsigned long positiveMachineIntegerValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); static void primitiveAdd(void); EXPORT(void) primitiveAddLargeIntegers(void); static void primitiveAdoptInstance(void); @@ -558,7 +559,7 @@ static void primitiveYield(void); extern sqInt signalNoResume(sqInt aSemaphore); extern int signed32BitValueOf(sqInt oop); extern sqLong signed64BitValueOf(sqInt oop); -extern long signedMachineIntegerValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); extern usqInt sizeOfAlienData(sqInt oop); extern void * startOfAlienData(sqInt oop); extern sqInt success(sqInt successBoolean); @@ -907,7 +908,6 @@ extern sqInt isLargeIntegerObject(sqInt oop); extern sqInt isLargeNegativeIntegerObject(sqInt oop); extern sqInt isLargePositiveIntegerObject(sqInt oop); static sqInt NoDbgRegParms isLiveContext(sqInt oop); -static sqInt NoDbgRegParms isMachineCodeFrame(char *theFP); static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); static sqInt isPrimitiveFunctionPointerAnIndex(void); extern sqInt isQuickPrimitiveIndex(sqInt anInteger); @@ -969,7 +969,7 @@ extern sqInt pop(sqInt nItems); extern void popthenPush(sqInt nItems, sqInt oop); extern sqInt positive32BitIntegerFor(unsigned int integerValue); extern sqInt positive64BitIntegerFor(usqLong integerValue); -static sqInt NoDbgRegParms positiveMachineIntegerFor(unsigned long value); +static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value); EXPORT(void) primitiveEventProcessingControl(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); extern sqInt primitiveIndexOf(sqInt methodPointer); @@ -1020,7 +1020,7 @@ static sqInt NoDbgRegParms pushedReceiverOrClosureOfFrame(char *theFP); extern void pushFloat(double f); extern sqInt pushInteger(sqInt integerValue); extern void push(sqInt object); -static void NoDbgRegParms putLongtoFile(long aLong, sqImageFile aFile); +static void NoDbgRegParms putLongtoFile(sqInt aLong, sqImageFile aFile); static void NoDbgRegParms putShorttoFile(short aShort, sqImageFile aFile); static void NoDbgRegParms putToSleepyieldingIf(sqInt aProcess, sqInt yieldImplicitly); static void NoDbgRegParms putWord32toFile(int aWord32, sqImageFile aFile); @@ -1074,8 +1074,8 @@ static sqInt stackPageByteSize(void); static sqInt stackPageHeadroom(void); static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); -extern usqInt stackPositiveMachineIntegerValue(sqInt offset); -extern long stackSignedMachineIntegerValue(sqInt offset); +extern usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset); +extern sqIntptr_t stackSignedMachineIntegerValue(sqInt offset); extern sqInt stackTop(void); extern sqInt stackValue(sqInt offset); extern sqInt startPCOfMethod(sqInt aCompiledMethod); @@ -1270,7 +1270,7 @@ _iss sqInt overflowLimit; _iss StackPage * overflowedPage; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; -_iss long methodCache[MethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; _iss sqInt rootTable[RootTableSize + 1 /* 2501 */]; @@ -1279,13 +1279,13 @@ _iss usqInt suspendedCallbacks[MaxJumpBuf + 1 /* 33 */]; _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; -_iss unsigned long byteCount; +_iss usqInt byteCount; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; _iss char * nativeSP; _iss char * nativeStackPointer; -_iss long nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; +_iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss char * shadowCallStack; _iss sqInt shadowCallStackPointer; #undef _iss @@ -1910,7 +1910,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1976]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-nice.1989]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -1979,7 +1979,7 @@ interpret(void) sqInt localReturnValue; char * localSP; sqInt stackPageBytes; - usqInt stackPagesBytes; + usqIntptr_t stackPagesBytes; void *theStackMemory; if (GIV(stackLimit) == 0) { @@ -4620,7 +4620,7 @@ interpret(void) l270: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { /* begin internalQuickPrimitiveResponse */ assert(isPrimitiveFunctionPointerAnIndex()); localPrimIndex = ((sqInt) primitiveFunctionPointer); @@ -4646,7 +4646,7 @@ interpret(void) longAtPointerput(localSP, GIV(nilObj)); goto l267; } - longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1)); + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); l267: /* end internalQuickPrimitiveResponse */; goto l268; } @@ -4731,7 +4731,7 @@ interpret(void) goto l265; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l265: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } @@ -4860,7 +4860,7 @@ interpret(void) } if (byte3 == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(aContext))); - object1 = (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + object1 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); goto l33; } if (byte3 == InstructionPointerIndex) { @@ -5254,8 +5254,8 @@ interpret(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); newClosure = newClosure1; if (numCopied > 0) { for (i = 0; i < numCopied; i += 1) { @@ -5550,7 +5550,7 @@ interpret(void) result = ((rcvr >> 1)) + ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -5684,7 +5684,7 @@ interpret(void) result = ((rcvr >> 1)) - ((arg >> 1)); if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6661,7 +6661,7 @@ interpret(void) && (arg < ((MaxSmallInteger) / rcvr)))); if (!overflow) { result = rcvr * arg; - oop = ((result << 1) | 1); + oop = (((usqInt)result << 1) | 1); /* begin internalPop:thenPush: */ longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); /* begin fetchNextBytecode */ @@ -6803,7 +6803,7 @@ interpret(void) result = rcvr / arg; if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((result << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -6932,7 +6932,7 @@ interpret(void) mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((mod << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7037,7 +7037,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l162; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7081,7 +7081,7 @@ interpret(void) quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); if (!GIV(primFailCode)) { /* begin internalPop:thenPush: */ - longAtPointerput((localSP += (2 - 1) * BytesPerOop), ((quotient << 1) | 1)); + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7351,7 +7351,7 @@ interpret(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) result1)) <= (MaxSmallInteger)) { - result = ((result1 << 1) | 1); + result = (((usqInt)result1 << 1) | 1); goto l174; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -7386,7 +7386,7 @@ interpret(void) else { if ((fmt2 < (firstCompiledMethodFormat())) || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { - result = (((byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); goto l174; } } @@ -7445,7 +7445,7 @@ interpret(void) sqInt sz2; sqInt totalLength; sqInt totalLength1; - sqInt valToPut; + int valToPut; sqInt value; VM_LABEL(bytecodePrimAtPut); @@ -7743,7 +7743,7 @@ interpret(void) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); l205: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -7787,7 +7787,7 @@ interpret(void) ? ((usqInt) (sz2 - BaseHeaderSize)) >> 2 : (sz2 - BaseHeaderSize) - (fmt1 & 3)); l207: /* end lengthOf: */; - longAtPointerput(localSP, ((sz << 1) | 1)); + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -8707,7 +8707,7 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) if (isNegative) { smallVal = 0 - smallVal; } - return ((smallVal << 1) | 1); + return (((usqInt)smallVal << 1) | 1); } if (isNegative) { largeClass = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); @@ -8827,13 +8827,99 @@ magnitude64BitValueOf(sqInt oop) } +/* Convert the given object into an integer value. + The object may be either a SmallInteger or a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + if ((oop & 1)) { + return (oop >> 1); + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex1 == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; + goto l2; + } + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l2; + + ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); + assert(!((oop & 1))); + ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; + if (ccIndex == 0) { + ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; + goto l1; + } + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l1; + + ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); + l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + if ((numBytesOfBytes(oop)) > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + if ((negative + ? magnitude > 0x80000000U + : magnitude >= 0x80000000U)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (negative) { + value = 0 - magnitude; + } + else { + value = magnitude; + } + return value; +} + + /* Convert the given object into an integer value. The object may be either a positive SmallInteger or a four-byte LargePositiveInteger. */ /* InterpreterPrimitives>>#positive32BitValueOf: */ -usqInt +unsigned int positive32BitValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt ccIndex; @@ -8842,10 +8928,10 @@ positive32BitValueOf(sqInt oop) sqInt sz; sqInt value; + /* begin maybeInlinePositive32BitValueOf: */ if ((oop & 1)) { value = (oop >> 1); - if ((value < 0) - || (0)) { + if (value < 0) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -8884,6 +8970,7 @@ positive32BitValueOf(sqInt oop) } return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } @@ -8960,7 +9047,7 @@ positive64BitValueOf(sqInt oop) /* only two callers & one is primitiveNewWithArg */ /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ -unsigned long +usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -9001,14 +9088,14 @@ positiveMachineIntegerValueOf(sqInt oop) return 0; } bs = numBytesOfBytes(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -9029,7 +9116,7 @@ primitiveAdd(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -9559,7 +9646,7 @@ primitiveAt(void) goto l9; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -9612,7 +9699,7 @@ primitiveAtPut(void) sqInt stSize1; sqInt sz1; sqInt totalLength1; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore1; sqInt value; /* begin commonAtPut: */ @@ -10069,7 +10156,7 @@ primitiveBehaviorHash(void) hashOrError = (((usqInt) (longAt(longAt(GIV(stackPointer))))) >> HashBitsOffset) & HashMaskUnshifted; if (hashOrError >= 0) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -10111,10 +10198,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10135,25 +10222,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10166,10 +10253,10 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10190,25 +10277,25 @@ primitiveBitAnd(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10279,10 +10366,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10303,25 +10390,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10334,10 +10421,10 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10358,25 +10445,25 @@ primitiveBitOr(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(oop2); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop2))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10474,7 +10561,7 @@ primitiveBitShift(void) /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { - shifted = ((shifted << 1) | 1); + shifted = (((usqInt)shifted << 1) | 1); goto l1; } newLargeInteger = eeInstantiateSmallClassIndexformatnumSlots(ClassLargePositiveIntegerCompactIndex, (firstByteFormat()) + ((4 - 4) & 3), 1); @@ -10607,10 +10694,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) null); + integerArgumentValue = ((usqIntptr_t) null); goto l2; } - integerArgumentValue = ((unsigned long) value); + integerArgumentValue = ((usqIntptr_t) value); goto l2; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10631,25 +10718,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } bs = numBytesOfBytes(integerArgument); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerArgumentValue = ((unsigned long) 0); + integerArgumentValue = ((usqIntptr_t) 0); goto l2; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - integerArgumentValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerArgument))))); goto l2; } else { - integerArgumentValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); goto l2; } l2: /* end positiveMachineIntegerValueOf: */; @@ -10661,10 +10748,10 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) null); + integerReceiverValue = ((usqIntptr_t) null); goto l4; } - integerReceiverValue = ((unsigned long) value1); + integerReceiverValue = ((usqIntptr_t) value1); goto l4; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -10685,25 +10772,25 @@ primitiveBitXor(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } bs1 = numBytesOfBytes(integerReceiver); - if (bs1 > (sizeof(unsigned long))) { + if (bs1 > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - integerReceiverValue = ((unsigned long) 0); + integerReceiverValue = ((usqIntptr_t) 0); goto l4; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs1 > 4)) { - integerReceiverValue = ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerReceiver))))); goto l4; } else { - integerReceiverValue = ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); goto l4; } l4: /* end positiveMachineIntegerValueOf: */; @@ -10763,7 +10850,7 @@ primitiveBytesLeft(void) integerVal = (oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; return; } @@ -10793,7 +10880,7 @@ primitiveBytesLeft(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(aBool)); - longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -11057,7 +11144,7 @@ primitiveClockLogAddresses(void) if (!(GIV(remapBufferCount) <= RemapBufferSize)) { error("remapBuffer overflow"); } - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), ((runInNOut << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); /* begin positive32BitIntegerFor: */ /* begin maybeInlinePositive32BitIntegerFor: */ assert(!((hasSixtyFourBitImmediates()))); @@ -11101,13 +11188,13 @@ primitiveClockLogAddresses(void) possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v1); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (1U << (shiftForWord())), v1); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), ((uidx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(GIV(remapBuffer)[GIV(remapBufferCount)], GIV(youngStart))) { possibleRootStoreIntovalue(GIV(remapBuffer)[GIV(remapBufferCount)], v2); } longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (3U << (shiftForWord())), v2); - longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), ((midx << 1) | 1)); + longAtput(((GIV(remapBuffer)[GIV(remapBufferCount)]) + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); /* begin pop:thenPush: */ oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; GIV(remapBufferCount) -= 1; @@ -11558,7 +11645,7 @@ static void primitiveConstantFill(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt end1; - sqInt fillValue1; + int fillValue1; usqInt i1; sqInt rcvr1; sqInt successBoolean; @@ -11589,7 +11676,7 @@ primitiveConstantFill(void) GIV(primFailCode) = 1; } } - fillValue1 = ((fillValue1 + (((sqInt)((usqInt)(fillValue1) << 8)))) + (((sqInt)((usqInt)(fillValue1) << 16)))) + (((sqInt)((usqInt)(fillValue1) << 24))); + fillValue1 = ((fillValue1 + (((int)((usqInt)(fillValue1) << 8)))) + (((int)((usqInt)(fillValue1) << 16)))) + (((int)((usqInt)(fillValue1) << 24))); } if (!GIV(primFailCode)) { end1 = rcvr1 + (sizeBitsOf(rcvr1)); @@ -11656,7 +11743,7 @@ primitiveControlVMProfiling(void) } numSamples = ioControlNewProfile(onOffBar,bufferSize); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp; } @@ -11840,7 +11927,7 @@ primitiveDiv(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((quotient << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -11903,7 +11990,7 @@ primitiveDivide(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((integerReceiver / integerArgument) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -12300,7 +12387,7 @@ primitiveExponent(void) /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ frac = frexp(rcvr, &pwr); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((pwr - 1) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(pwr - 1) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -13978,10 +14065,10 @@ static void primitiveGetNextEvent(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt arg; - long eventTypeIs; - long evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; sqInt i; - long value; + sqIntptr_t value; arg = longAt(GIV(stackPointer)); if (!((((arg & 1) == 0) @@ -13997,7 +14084,7 @@ primitiveGetNextEvent(void) eventTypeIs = evtBuf[0]; /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((evtBuf[0]) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); } else { /* begin primitiveFail */ @@ -14025,7 +14112,7 @@ primitiveGetNextEvent(void) /* Event time stamp */ /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); } else { /* begin primitiveFail */ @@ -14041,7 +14128,7 @@ primitiveGetNextEvent(void) if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { - longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ((value << 1) | 1)); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); } else { /* begin primitiveFail */ @@ -14122,8 +14209,8 @@ primitiveGetWindowSize(void) GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; /* begin push: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((w << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((h << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)w << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)h << 1) | 1)); object = pointResult; longAtput((sp = GIV(stackPointer) - BytesPerWord), object); GIV(stackPointer) = sp; @@ -14325,7 +14412,7 @@ primitiveIdentityHash(void) } else { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)((((usqInt) (longAt(thisReceiver))) >> HashBitsOffset) & HashMaskUnshifted) << 1) | 1)); GIV(stackPointer) = sp; } } @@ -14506,7 +14593,7 @@ primitiveInputWord(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } @@ -14589,7 +14676,7 @@ primitiveIntegerAt(void) GIV(stackPointer) += 2 * BytesPerWord; if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -14642,7 +14729,11 @@ primitiveIntegerAtPut(void) goto l2; } l2: /* end stackIntegerValue: */; - value = signed32BitValueOf(valueOop); + /* begin signed32BitValueOf: */ + value = noInlineSigned32BitValueOf(valueOop); + goto l3; + +l3: /* end signed32BitValueOf: */; if (GIV(primFailCode)) { GIV(primFailCode) = PrimErrBadArgument; return; @@ -14676,12 +14767,12 @@ primitiveIntegerAtPut(void) sz1 -= header & Size4Bit; if (fmt <= 4) { sz = ((usqInt) (sz1 - BaseHeaderSize)) >> (shiftForWord()); - goto l3; + goto l4; } sz = (fmt < (firstByteFormat()) ? ((usqInt) (sz1 - BaseHeaderSize)) >> 2 : (sz1 - BaseHeaderSize) - (fmt & 3)); -l3: /* end lengthOf:baseHeader:format: */; +l4: /* end lengthOf:baseHeader:format: */; if (!((index >= 1) && (index <= sz))) { GIV(primFailCode) = PrimErrBadIndex; @@ -14721,7 +14812,7 @@ primitiveInterruptChecksPerMSec(void) return null; } /* begin pop:thenPush: */ - oop = (((ioHeartbeatMilliseconds()) << 1) | 1); + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; return 0; @@ -14838,7 +14929,7 @@ primitiveInvokeObjectAsMethod(void) findNewMethodInClassTag(lookupClassTag); /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l8; } @@ -14921,7 +15012,7 @@ primitiveInvokeObjectAsMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -15074,7 +15165,7 @@ primitiveKbdNext(void) keystrokeWord = ioGetKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -15104,7 +15195,7 @@ primitiveKbdPeek(void) keystrokeWord = ioPeekKeystroke(); if (keystrokeWord >= 0) { /* begin pushInteger: */ - longAtput((sp1 = GIV(stackPointer) - BytesPerWord), ((keystrokeWord << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), (((usqInt)keystrokeWord << 1) | 1)); GIV(stackPointer) = sp1; } else { @@ -15538,7 +15629,7 @@ primitiveMaxIdentityHash(void) char *sp; /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((HashMaskUnshifted << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)HashMaskUnshifted << 1) | 1)); GIV(stackPointer) = sp; } @@ -15567,7 +15658,7 @@ primitiveMillisecondClock(void) char *sp; /* begin pop:thenPush: */ - oop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1); + oop = (((usqInt)((ioMSecs()) & MillisecondClockMask) << 1) | 1); longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; } @@ -15583,7 +15674,7 @@ primitiveMillisecondClockMask(void) char *sp; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((MillisecondClockMask << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)MillisecondClockMask << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -15600,7 +15691,7 @@ primitiveMod(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)mod)) ^ ((((usqInt)mod)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((mod << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)mod << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -15681,7 +15772,7 @@ primitiveMouseButtons(void) GIV(stackPointer) += 1 * BytesPerWord; buttonWord = ioGetButtonState(); /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((buttonWord << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)buttonWord << 1) | 1)); GIV(stackPointer) = sp; } @@ -15726,8 +15817,8 @@ primitiveMousePoint(void) l2: /* end signExtend16: */; /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((x << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((y << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)x << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)y << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -15795,7 +15886,7 @@ primitiveMultiply(void) else { integerResult = integerRcvr * integerArg; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } } @@ -15965,7 +16056,7 @@ primitiveNewWithArg(void) sqInt ok; sqInt oop; sqInt oop1; - unsigned long size; + usqIntptr_t size; char *sp1; sqInt spaceOkay; sqInt value; @@ -16007,7 +16098,7 @@ primitiveNewWithArg(void) goto l5; } bs = numBytesOfBytes(oop1); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -16015,7 +16106,7 @@ primitiveNewWithArg(void) size = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop1))); goto l5; @@ -16225,7 +16316,7 @@ primitiveNextObject(void) l1: /* end accessibleObjectAfter: */; if (instance == null) { /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((0 << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -16601,7 +16692,7 @@ primitivePathToUsing(void) goto l6; } longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); - longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), ((index << 1) | 1)); + longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp + 1)) << (shiftForWord())))), (((usqInt)index << 1) | 1)); stackp += 2; if ((((((usqInt)(((char *) next)))) & (BytesPerWord - 1)) == 0) && ((((((usqInt)(((char *) next)))) >= (((usqInt)GIV(stackMemory)))) && ((((usqInt)(((char *) next)))) <= (((usqInt)GIV(pages))))))) { @@ -16803,7 +16894,7 @@ primitivePerformInSuperclass(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -16886,7 +16977,7 @@ primitivePerformInSuperclass(void) goto l9; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l9: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -17016,7 +17107,7 @@ primitivePerformWithArgs(void) GIV(stackPointer) += (performArgCount + 2) * BytesPerWord; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -17099,7 +17190,7 @@ primitivePerformWithArgs(void) goto l9; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l9: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -17327,7 +17418,7 @@ primitiveQuo(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -17714,7 +17805,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17724,7 +17815,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17771,7 +17862,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17781,7 +17872,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanLastIndex)) ^ ((((usqInt)scanLastIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanLastIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanLastIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17806,7 +17897,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanDestX)) ^ ((((usqInt)scanDestX)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), ((scanDestX << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)scanDestX << 1) | 1)); } else { /* begin primitiveFail */ @@ -17816,7 +17907,7 @@ primitiveScanCharacters(void) } /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)scanStopIndex)) ^ ((((usqInt)scanStopIndex)) << 1)))) >= 0) { - longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), ((scanStopIndex << 1) | 1)); + longAtput((rcvr + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)scanStopIndex << 1) | 1)); } else { /* begin primitiveFail */ @@ -17851,7 +17942,7 @@ primitiveScreenDepth(void) return null; } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((depth << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)depth << 1) | 1)); GIV(stackPointer) = sp; return 0; } @@ -17904,8 +17995,8 @@ primitiveScreenSize(void) pointWord = ioScreenSize(); /* begin pop:thenPush: */ pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((pointWord & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)((((usqInt) pointWord) >> 16) & 0xFFFF) << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)(pointWord & 0xFFFF) << 1) | 1)); oop = pointResult; longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); GIV(stackPointer) = sp; @@ -18348,7 +18439,7 @@ primitiveSetOrHasIdentityHash(void) /* begin setHashBitsOf:to: */ longAtput(thisReceiver, ((((longAt(thisReceiver)) | HashBits) - HashBits)) | (((sqInt)((usqInt)((hash & HashMaskUnshifted)) << HashBitsOffset)))); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((oldHash << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)oldHash << 1) | 1)); GIV(stackPointer) = sp1; } } @@ -18476,7 +18567,7 @@ primitiveShortAt(void) } value = shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1)))); /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -18531,7 +18622,7 @@ primitiveShortAtPut(void) } shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << 1))), value); /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), ((value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); GIV(stackPointer) = sp; } @@ -18788,7 +18879,7 @@ primitiveSize(void) fixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 0x3F)) - 1; l3: /* end fixedFieldsOf:format:length: */; /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((totalLength - fixedFields) << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(totalLength - fixedFields) << 1) | 1)); GIV(stackPointer) = sp; } @@ -19254,7 +19345,7 @@ primitiveStringAt(void) goto l9; } if (fmt >= (firstByteFormat())) { - result = (((byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l9; } /* begin positive32BitIntegerFor: */ @@ -19325,7 +19416,7 @@ primitiveStringAtPut(void) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; sqInt value; sqInt value1; @@ -19730,7 +19821,7 @@ primitiveSubtract(void) if (!GIV(primFailCode)) { if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), ((integerResult << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20130,7 +20221,7 @@ primitiveTruncated(void) } if (!GIV(primFailCode)) { /* begin pushInteger: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), (((((sqInt)trunc)) << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)(((sqInt)trunc)) << 1) | 1)); GIV(stackPointer) = sp; } else { @@ -20289,7 +20380,7 @@ primitiveUtcAndTimezoneOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds()); @@ -20334,7 +20425,7 @@ primitiveUtcWithOffset(void) resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 2); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = (((ioLocalSecondsOffset()) << 1) | 1); + valuePointer = (((usqInt)(ioLocalSecondsOffset()) << 1) | 1); longAtput((resultArray + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer); /* begin storePointer:ofObject:withValue: */ valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta); @@ -20411,7 +20502,7 @@ primitiveVMProfileSamplesInto(void) } numSamples = ioNewProfileSamplesInto(firstFixedField(sampleBuffer)); /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((numSamples << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); GIV(stackPointer) = sp1; } @@ -20431,7 +20522,7 @@ primitiveWait(void) if (excessSignals > 0) { /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals - 1))) ^ ((((usqInt)(excessSignals - 1))) << 1)))) >= 0) { - longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals - 1) << 1) | 1)); + longAtput((sema + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals - 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -20502,90 +20593,14 @@ signalNoResume(sqInt aSemaphore) /* Convert the given object into an integer value. - The object may be either a positive SmallInteger or a four-byte - LargeInteger. - */ + The object may be either a SmallInteger or a four-byte LargeInteger. */ /* InterpreterPrimitives>>#signed32BitValueOf: */ int signed32BitValueOf(sqInt oop) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt ccIndex; - sqInt ccIndex1; - sqInt classOop; - sqInt classOop1; - unsigned int magnitude; - sqInt negative; - sqInt ok; - int value; - - if ((oop & 1)) { - return (oop >> 1); - - } - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex1 = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex1 == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop1; - goto l2; - } - ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; - goto l2; - - ok = classOop1 == (fetchPointerofObject(ccIndex1 - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); -l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (ok) { - negative = 0; - } - else { - negative = 1; - /* begin isClassOfNonImm:equalTo:compactClassIndex: */ - classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeInteger) << (shiftForWord()))))); - assert(!((oop & 1))); - ccIndex = (((usqInt) (longAt(oop))) >> (compactClassFieldLSB())) & 0x1F; - if (ccIndex == 0) { - ok = ((longAt(oop - BaseHeaderSize)) & AllButTypeMask) == classOop; - goto l1; - } - ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; - goto l1; +{ + return noInlineSigned32BitValueOf(oop); - ok = classOop == (fetchPointerofObject(ccIndex - 1, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(CompactClasses) << (shiftForWord()))))))); - l1: /* end isClassOfNonImm:equalTo:compactClassIndex: */; - if (!ok) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - } - if ((numBytesOfBytes(oop)) > 4) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return null; - } - magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); - if ((negative - ? magnitude > 0x80000000U - : magnitude >= 0x80000000U)) { - /* begin primitiveFail */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - return 0; - } - if (negative) { - value = 0 - magnitude; - } - else { - value = magnitude; - } - return value; } @@ -20691,7 +20706,7 @@ signed64BitValueOf(sqInt oop) */ /* InterpreterPrimitives>>#signedMachineIntegerValueOf: */ -long +sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -20699,11 +20714,11 @@ signedMachineIntegerValueOf(sqInt oop) sqInt ccIndex1; sqInt classOop; sqInt classOop1; - usqInt limit; - usqInt magnitude; + usqIntptr_t limit; + usqIntptr_t magnitude; sqInt negative; sqInt ok; - long value; + sqInt value; if ((oop & 1)) { return (oop >> 1); @@ -20748,14 +20763,14 @@ signedMachineIntegerValueOf(sqInt oop) } } bs = numBytesOf(oop); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } return null; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(sqIntptr_t)) == 8) && (bs > 4)) { magnitude = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, oop))); } @@ -20764,7 +20779,7 @@ signedMachineIntegerValueOf(sqInt oop) /* ] */ magnitude = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); } - limit = (((usqInt)1)) << (((sizeof(usqInt)) * 8) - 1); + limit = (((usqIntptr_t)1)) << (((sizeof(sqIntptr_t)) * 8) - 1); if ((negative ? magnitude > limit : magnitude >= limit)) { @@ -20873,7 +20888,7 @@ initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slo StackPage *page; char *pageStructBase; void *pointer; - unsigned long structStackPageSize; + usqIntptr_t structStackPageSize; sqInt theIndex; @@ -21151,7 +21166,7 @@ allInstancesOf(sqInt aBehavior) longAtput(p, p); } } - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } byteSize = fillPointer - (((sqInt)(firstFixedField(container)))); /* begin sizeHeader:putBodySize: */ @@ -26127,7 +26142,7 @@ allObjects(void) obj = (obj + sz1) + (headerTypeBytes[(longAt(obj + sz1)) & TypeMask]); } if (resultArray == null) { - return ((count << 1) | 1); + return (((usqInt)count << 1) | 1); } if (newCount < count) { shortentoIndexableSize(resultArray, newCount); @@ -29898,7 +29913,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ GIV(lastMethodCacheProbeWrite) = probe; @@ -29911,7 +29926,7 @@ addNewMethodToCache(sqInt classObj) GIV(methodCache)[probe + MethodCacheSelector] = GIV(messageSelector); GIV(methodCache)[probe + MethodCacheClass] = classObj; GIV(methodCache)[probe + MethodCacheMethod] = GIV(newMethod); - GIV(methodCache)[probe + MethodCachePrimFunction] = (((long) primitiveFunctionPointer)); + GIV(methodCache)[probe + MethodCachePrimFunction] = (((sqIntptr_t) primitiveFunctionPointer)); /* this for primitiveExternalMethod */ /* ...and zap the following entries */ @@ -30709,7 +30724,7 @@ checkOkayInterpreterObjects(sqInt writeBack) sqInt iLimiT; sqInt ok; sqInt oop; - long oopOrZero; + sqIntptr_t oopOrZero; ok = 1; ok = ok && (checkOkayFields(GIV(nilObj))); @@ -31099,7 +31114,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) pc = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))); /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - encodedip = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + encodedip = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); return pc == encodedip; } @@ -31341,7 +31356,7 @@ displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) return null; } } - ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); + ((int (*)(sqIntptr_t, int, int, int, int))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top); } else { assert(isNonImmediate(dispBits)); @@ -31431,7 +31446,7 @@ divorceFramesIn(StackPage *aStackPage) updateStateOfSpouseContextForFrameWithSP(theFP, theSP); /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); assert((frameReceiver(theFP)) == (fetchPointerofObject(ReceiverIndex, theContext))); if (calleeContext != null) { @@ -31919,7 +31934,7 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) } /* begin storePointerUnchecked:ofObject:withValue: */ assert(validInstructionPointerinFrame(theIP + 1, theFP)); - valuePointer = (((((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + valuePointer = (((usqInt)(((theIP - (longAt(theFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer); /* begin storePointer:ofObject:withValue: */ if (oopisLessThan(ctxt, GIV(youngStart))) { @@ -32137,7 +32152,7 @@ externalQuickPrimitiveResponse(void) return 1; } /* begin pop:thenPush: */ - longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((localPrimIndex - 261) << 1) | 1)); + longAtput((sp4 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)(localPrimIndex - 261) << 1) | 1)); GIV(stackPointer) = sp4; return 1; } @@ -32297,7 +32312,7 @@ fetchPointerofMarriedContext(sqInt offset, sqInt aContext) return marryFrameSP(callerFP, theSP); } if (offset == StackPointerIndex) { - return (((stackPointerIndexForFrame(spouseFP)) << 1) | 1); + return (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); } if (offset == InstructionPointerIndex) { return instructionPointerForFramecurrentFPcurrentIP(spouseFP, GIV(framePointer), GIV(instructionPointer)); @@ -33391,7 +33406,7 @@ instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sq } /* begin contextInstructionPointer:frame: */ assert(validInstructionPointerinFrame(theIP + 1, spouseFP)); - return (((((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); + return (((usqInt)(((theIP - (longAt(spouseFP + FoxMethod))) - BaseHeaderSize) + 2) << 1) | 1); } @@ -33603,18 +33618,6 @@ isLiveContext(sqInt oop) return !(isWidowedContext(oop)); } - -/* For compatibility with CoInterpreter. Needed to avoid - slowPrimitiveResponse failing within ceSend:to:numArgs: et al with an - unbalanced stack. */ - - /* StackInterpreter>>#isMachineCodeFrame: */ -static sqInt NoDbgRegParms -isMachineCodeFrame(char *theFP) -{ - return 0; -} - /* StackInterpreter>>#isMarriedOrWidowedContext: */ static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext) @@ -33632,7 +33635,7 @@ isMarriedOrWidowedContext(sqInt aContext) static sqInt isPrimitiveFunctionPointerAnIndex(void) { - return (((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; + return (((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex; } /* StackInterpreter>>#isQuickPrimitiveIndex: */ @@ -34190,7 +34193,7 @@ longPrintOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -34706,8 +34709,8 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) sqInt pointResult; pointResult = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))), YIndex + 1); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), ((xValue << 1) | 1)); - longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), ((yValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))), (((usqInt)xValue << 1) | 1)); + longAtput((pointResult + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))), (((usqInt)yValue << 1) | 1)); return pointResult; } @@ -35178,7 +35181,7 @@ marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop if ((anOop & 1)) { /* Check stack and instruction pointer fields. */ - if ((anOop == (((((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) + if ((anOop == ((((usqInt)((((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1))) << 1) | 1))) || (anOop == (externalInstVarofContext(InstructionPointerIndex, spouseContext)))) { return 1; } @@ -35303,7 +35306,7 @@ marryFrameSP(char *theFP, char *theSP) assert(((oopForPointer(value)) & (BytesPerWord - 1)) == 0); valuePointer2 = (oopForPointer(value)) + 1; longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer2); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((numStack << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)numStack << 1) | 1)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord())))), longAt(theFP + FoxMethod)); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord())))), closureOrNil); longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord())))), longAt(theFP + FoxReceiver)); @@ -35664,7 +35667,7 @@ noInlineSigned32BitIntegerFor(sqInt integerValue) sqInt newLargeInteger; if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - return ((integerValue << 1) | 1); + return (((usqInt)integerValue << 1) | 1); } assert(!((hasSixtyFourBitImmediates()))); if (integerValue < 0) { @@ -35910,7 +35913,7 @@ positive64BitIntegerFor(usqLong integerValue) /* StackInterpreter>>#positiveMachineIntegerFor: */ static sqInt NoDbgRegParms -positiveMachineIntegerFor(unsigned long value) +positiveMachineIntegerFor(usqIntptr_t value) { sqInt newLargeInteger; sqInt resultObj; @@ -36921,7 +36924,7 @@ printHex(sqInt n) /* large enough for a 64-bit value in hex plus the null plus 16 spaces */ memset(buf,' ',36); - len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%lx", (unsigned long)(n)); + len = sprintf(buf + 2 + 2 * BytesPerWord, "0x%" PRIxSQPTR, (usqIntptr_t)(n)); printf("%s", buf + len); } @@ -37155,12 +37158,12 @@ printMethodCache(void) void printMethodCacheFor(sqInt thing) { DECL_MAYBE_SQ_GLOBAL_STRUCT - long c; + sqIntptr_t c; sqInt i; - long m; + sqIntptr_t m; sqInt n; - long p; - long s; + sqIntptr_t p; + sqIntptr_t s; n = 0; for (i = 0; i < MethodCacheSize; i += MethodCacheEntrySize) { @@ -37191,7 +37194,7 @@ printMethodCacheFor(sqInt thing) /* begin tab */ putchar(' '); if (((((usqInt) (longAt(s))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) { - printf("%lx %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); + printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s)); } else { shortPrintOop(s); @@ -37650,7 +37653,7 @@ printOop(sqInt oop) column = 1; for (index = startIP; index <= lastIndex; index += 1) { if (column == 1) { - printf("0x%08lx: ", (unsigned long)(oop+BaseHeaderSize+index-1)); + printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1)); } byte = byteAt((oop + BaseHeaderSize) + (index - 1)); printf(" %02x/%-3d", (int)byte,(int)byte); @@ -38116,7 +38119,7 @@ pushInteger(sqInt integerValue) char *sp; /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), ((integerValue << 1) | 1)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), (((usqInt)integerValue << 1) | 1)); GIV(stackPointer) = sp; return null; } @@ -38143,11 +38146,11 @@ push(sqInt object) /* StackInterpreter>>#putLong:toFile: */ static void NoDbgRegParms -putLongtoFile(long aLong, sqImageFile aFile) +putLongtoFile(sqInt aLong, sqImageFile aFile) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt objectsWritten; - objectsWritten = sqImageFileWrite((&aLong), sizeof(long), 1, aFile); + objectsWritten = sqImageFileWrite((&aLong), sizeof(sqInt), 1, aFile); /* begin success: */ if (!(objectsWritten == 1)) { @@ -39030,7 +39033,7 @@ static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCacheMethod]) == GIV(newMethod)) { - GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((long) localPrimAddress)); + GIV(methodCache)[GIV(lastMethodCacheProbeWrite) + MethodCachePrimFunction] = (((sqIntptr_t) localPrimAddress)); } } @@ -39217,7 +39220,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -39375,7 +39378,7 @@ sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt reg goto l1; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l1: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -39540,6 +39543,7 @@ static sqInt NoDbgRegParms shortPrintContext(sqInt aContext) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt home; + sqInt senderOop; char *theFP; if (!(((aContext & 1) == 0) @@ -39553,9 +39557,14 @@ shortPrintContext(sqInt aContext) printHex(aContext); if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin withoutSmallIntegerTags: */ + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); print(" I ("); - printHex(((usqInt)theFP)); + printHex(((usqIntptr_t)theFP)); print(") "); } else { @@ -39790,14 +39799,14 @@ signed64BitIntegerFor(sqLong integerValue) if (integerValue < 0) { if (integerValue >= (MinSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargeNegativeIntegerCompactIndex; magnitude = 0 - (((usqLong) integerValue)); } else { if (integerValue <= (MaxSmallInteger)) { - return (((((sqInt)integerValue)) << 1) | 1); + return (((usqInt)(((sqInt)integerValue)) << 1) | 1); } largeClass = ClassLargePositiveIntegerCompactIndex; magnitude = integerValue; @@ -39988,7 +39997,7 @@ snapshot(sqInt embedded) ((sqInt (*)(char *, char *, char *))setMacType)(imageName, "STim", "FAST"); } } - longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((stackIndex - 1) << 1) | 1)); + longAtput((activeContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)(stackIndex - 1) << 1) | 1)); } marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext); if (!GIV(primFailCode)) { @@ -40056,7 +40065,7 @@ snapshot(sqInt embedded) goto l4; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l4: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -40308,7 +40317,7 @@ stackPointerIndexForFrame(char *theFP) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackPositiveMachineIntegerValue: */ -usqInt +usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bs; @@ -40327,9 +40336,9 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) null); + return null; } - return ((unsigned long) value); + return value; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveInteger) << (shiftForWord()))))); @@ -40349,22 +40358,22 @@ stackPositiveMachineIntegerValue(sqInt offset) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } bs = numBytesOfBytes(integerPointer); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - return ((unsigned long) 0); + return 0; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { - return ((unsigned long) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))))); + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, integerPointer))); } else { - return ((unsigned long) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))))); + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerPointer + BaseHeaderSize) + (0U << 2)))))); } } @@ -40372,7 +40381,7 @@ stackPositiveMachineIntegerValue(sqInt offset) /* In the StackInterpreter stacks grow down. */ /* StackInterpreter>>#stackSignedMachineIntegerValue: */ -long +sqIntptr_t stackSignedMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerPointer; @@ -40506,7 +40515,7 @@ stObjectat(sqInt array, sqInt index) return longAt((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); } if (fmt >= (firstByteFormat())) { - return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + return (((usqInt)(byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); } /* begin positive32BitIntegerFor: */ integerValue = long32At((array + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); @@ -40549,7 +40558,7 @@ stObjectatput(sqInt array, sqInt index, sqInt value) sqInt stSize; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; hdr = longAt(array); fmt = (((usqInt) hdr) >> (instFormatFieldLSB())) & 15; @@ -40669,7 +40678,7 @@ sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT if ((((sqInt)((((usqInt)integerValue)) ^ ((((usqInt)integerValue)) << 1)))) >= 0) { - longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), ((integerValue << 1) | 1)); + longAtput((objectPointer + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord())))), (((usqInt)integerValue << 1) | 1)); } else { /* begin primitiveFail */ @@ -40852,7 +40861,7 @@ synchronousSignal(sqInt aSemaphore) excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore); /* begin storeInteger:ofObject:withValue: */ if ((((sqInt)((((usqInt)(excessSignals + 1))) ^ ((((usqInt)(excessSignals + 1))) << 1)))) >= 0) { - longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((excessSignals + 1) << 1) | 1)); + longAtput((aSemaphore + BaseHeaderSize) + (((int)((usqInt)(ExcessSignalsIndex) << (shiftForWord())))), (((usqInt)(excessSignals + 1) << 1) | 1)); } else { /* begin primitiveFail */ @@ -41083,7 +41092,7 @@ updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP) pointer -= BytesPerWord; } assert((ReceiverIndex + tempIndex) < (lengthOf(theContext))); - longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((tempIndex << 1) | 1)); + longAtput((theContext + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)tempIndex << 1) | 1)); } @@ -41693,8 +41702,8 @@ primitiveClosureCopyWithCopiedValues(void) newClosure1 = eeInstantiateSmallClassnumSlots(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))), ClosureFirstCopiedValueIndex + numCopied); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), ((initialIP << 1) | 1)); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), ((numArgs << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); for (i = 0; i < numCopied; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))), longAt((copiedValues + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))); @@ -41841,7 +41850,7 @@ primitiveContextAt(void) goto l13; } if (fmt1 >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields1) - 1))) << 1) | 1); goto l13; } /* begin positive32BitIntegerFor: */ @@ -41943,7 +41952,7 @@ primitiveContextAt(void) goto l3; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + value = (((usqInt)(byteAt((aContext + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); goto l3; } /* begin positive32BitIntegerFor: */ @@ -42024,8 +42033,8 @@ primitiveContextAtPut(void) sqInt sz1; sqInt totalLength; sqInt totalLength1; - usqInt unsignedValueToStore; - usqInt unsignedValueToStore1; + unsigned int unsignedValueToStore; + unsigned int unsignedValueToStore1; sqInt value; value = longAt(GIV(stackPointer)); @@ -42370,7 +42379,7 @@ primitiveContextSize(void) sz = totalLength - fixedFields; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((sz << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)sz << 1) | 1)); GIV(stackPointer) = sp; } @@ -42406,7 +42415,7 @@ primitiveContextXray(void) flags = 0; } /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((flags << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)flags << 1) | 1)); GIV(stackPointer) = sp; } @@ -42777,7 +42786,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp1; index += 1; } - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); GIV(tempOop2) = 0; return; @@ -42819,7 +42828,7 @@ primitiveDoPrimitiveWithArgs(void) GIV(stackPointer) = sp2; } /* begin pushInteger: */ - longAtput((sp3 = GIV(stackPointer) - BytesPerWord), ((primIdx << 1) | 1)); + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), (((usqInt)primIdx << 1) | 1)); GIV(stackPointer) = sp3; /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(tempOop)); @@ -42891,7 +42900,7 @@ primitiveExecuteMethod(void) GIV(argumentCount) -= 1; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l9; } @@ -42974,7 +42983,7 @@ primitiveExecuteMethod(void) goto l5; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l5: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -43080,7 +43089,7 @@ primitiveExecuteMethodArgsArray(void) GIV(argumentCount) = argCnt; /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l11; } @@ -43163,7 +43172,7 @@ primitiveExecuteMethodArgsArray(void) goto l7; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l7: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -43345,7 +43354,7 @@ primitiveExternalCall(void) l3: /* end addToExternalPrimitiveTable: */; } - longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), ((index << 1) | 1)); + longAtput((lit + BaseHeaderSize) + (3U << (shiftForWord())), (((usqInt)index << 1) | 1)); if (index >= 0) { rewriteMethodCacheEntryForExternalPrimitiveToFunction(addr); /* begin callExternalPrimitive: */ @@ -43620,7 +43629,7 @@ primitiveFullGC(void) integerVal1 = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(1)); - longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal1 << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal1 << 1) | 1)); GIV(stackPointer) = sp1; } @@ -43661,7 +43670,7 @@ primitiveIncrementalGC(void) integerVal = ((oopisLessThan(GIV(freeStart), GIV(reserveStart)) ? (((usqInt) GIV(reserveStart))) - (((usqInt) GIV(freeStart))) : 0)) + (sqMemoryExtraBytesLeft(0)); - longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1)); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); GIV(stackPointer) = sp; } @@ -43751,7 +43760,7 @@ primitiveInstVarAt(void) goto l1; } if (fmt >= (firstByteFormat())) { - value = (((byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); + value = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index - 1))) << 1) | 1); goto l1; } /* begin positive32BitIntegerFor: */ @@ -43793,7 +43802,7 @@ primitiveInstVarAtPut(void) char *sp; sqInt sz; sqInt totalLength; - usqInt unsignedValueToStore; + unsigned int unsignedValueToStore; newValue = longAt(GIV(stackPointer)); index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); @@ -44186,7 +44195,7 @@ primitivePerform(void) } /* begin executeNewMethod */ if (primitiveFunctionPointer != 0) { - if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { externalQuickPrimitiveResponse(); goto l7; } @@ -44269,7 +44278,7 @@ primitivePerform(void) goto l3; } } - errorCode = ((GIV(primFailCode) << 1) | 1); + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); l3: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(GIV(stackPointer), errorCode); } @@ -44523,7 +44532,7 @@ primitiveSlotAt(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { /* begin externalWriteBackHeadFramePointers */ assert((GIV(framePointer) - GIV(stackPointer)) < (LargeContextSlots * BytesPerOop)); @@ -44538,7 +44547,7 @@ primitiveSlotAt(void) (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); numLiveSlots = (stackPointerForMaybeMarriedContext(rcvr)) + CtxtTempFrameStart; - if ((((unsigned long)index)) < numLiveSlots) { + if ((((usqInt)index)) < numLiveSlots) { value = externalInstVarofContext(index, rcvr); } else { @@ -44562,9 +44571,9 @@ primitiveSlotAt(void) return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPushInteger: */ - longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)(byteAt((rcvr + BaseHeaderSize) + index)) << 1) | 1)); GIV(stackPointer) = sp1; return; } @@ -44573,7 +44582,7 @@ primitiveSlotAt(void) } if (fmt == 7) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 3; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ oop = positive64BitIntegerFor(fetchLong64ofObject(index, rcvr)); longAtput((sp3 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); @@ -44585,7 +44594,7 @@ primitiveSlotAt(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { /* begin pop:thenPush: */ integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2)))); /* begin maybeInlinePositive32BitIntegerFor: */ @@ -44641,7 +44650,7 @@ primitiveSlotAtPut(void) char *sp1; char *sp4; sqInt sz; - unsigned long value; + usqIntptr_t value; sqInt value1; newValue = longAt(GIV(stackPointer)); @@ -44674,7 +44683,7 @@ primitiveSlotAtPut(void) ? (longAt(rcvr - (BytesPerWord * 2))) & AllButTypeMask : header & SizeMask); numSlots = ((usqInt) (sz - BaseHeaderSize)) >> (shiftForWord()); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { if (((((usqInt) (longAt(rcvr))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex) { externalInstVarofContextput(index, rcvr, newValue); } @@ -44729,7 +44738,7 @@ primitiveSlotAtPut(void) goto l5; } bs = numBytesOfBytes(newValue); - if (bs > (sizeof(unsigned long))) { + if (bs > (sizeof(usqIntptr_t))) { /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; @@ -44737,7 +44746,7 @@ primitiveSlotAtPut(void) value = 0; goto l5; } - if (((sizeof(unsigned long)) == 8) + if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((fetchLong64ofObject(0, newValue))); goto l5; @@ -44756,12 +44765,12 @@ primitiveSlotAtPut(void) (GIV(primFailCode) = PrimErrUnsupported); return; } - if ((((unsigned long)value)) > 0xFF) { + if ((((usqInt)value)) > 0xFF) { (GIV(primFailCode) = PrimErrBadArgument); return; } numSlots = numBytesOfBytes(rcvr); - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { byteAtput((rcvr + BaseHeaderSize) + index, value); /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -44773,7 +44782,7 @@ primitiveSlotAtPut(void) } if (fmt >= (firstLongFormat())) { numSlots = ((usqInt) (numBytesOf(rcvr))) >> 2; - if ((((unsigned long)index)) < numSlots) { + if ((((usqInt)index)) < numSlots) { long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(index) << 2))), value); /* begin pop:thenPush: */ longAtput((sp4 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), newValue); @@ -44886,7 +44895,7 @@ primitiveStoreStackp(void) } /* begin storeStackPointerValue:inContext: */ assert((ReceiverIndex + newStackp) < (lengthOf(ctxt))); - longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), ((newStackp << 1) | 1)); + longAtput((ctxt + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord())))), (((usqInt)newStackp << 1) | 1)); /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; } @@ -45338,16 +45347,16 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer7); } longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer7); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), ((GIV(tenuringThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), ((GIV(statFullGCs) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), (((usqInt)GIV(tenuringThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), (((usqInt)GIV(statFullGCs) << 1) | 1)); longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = (((GIV(statIncrGCs)) << 1) | 1); + valuePointer8 = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ valuePointer9 = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer9); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), ((GIV(statTenures) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), (((usqInt)GIV(statTenures) << 1) | 1)); for (i = 11; i <= 17; i += 1) { longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } @@ -45357,47 +45366,47 @@ primitiveVMParameter(void) possibleRootStoreIntovalue(result, valuePointer10); } longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer10); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), ((GIV(rootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), ((GIV(statRootTableOverflows) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), ((extraVMMemory << 1) | 1)); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), ((GIV(shrinkThreshold) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), ((GIV(growHeadroom) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), (((usqInt)GIV(rootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), (((usqInt)GIV(statRootTableOverflows) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), (((usqInt)GIV(shrinkThreshold) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), (((usqInt)GIV(growHeadroom) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer11 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer11); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), ((GIV(statMarkCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), ((GIV(statSweepCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), ((GIV(statMkFwdCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), ((GIV(statCompMoveCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), ((GIV(statGrowMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), ((GIV(statShrinkMemory) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), ((GIV(statRootTableCount) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), ((GIV(statSurvivorCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), (((usqInt)GIV(statMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), (((usqInt)GIV(statSweepCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), (((usqInt)GIV(statMkFwdCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), (((usqInt)GIV(statCompMoveCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), (((usqInt)GIV(statGrowMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), (((usqInt)GIV(statShrinkMemory) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), (((usqInt)GIV(statRootTableCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), (((usqInt)GIV(statSurvivorCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), ((GIV(statSpecialMarkCount) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), (((usqInt)GIV(statSpecialMarkCount) << 1) | 1)); longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), ((GIV(statPendingFinalizationSignals) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), ((BytesPerWord << 1) | 1)); + longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((6505) << 1) | 1); + valuePointer12 = (((usqInt)(6505) << 1) | 1); longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer12); - longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), ((GIV(numStackPages) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), ((desiredNumStackPages << 1) | 1)); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), ((GIV(edenBytes) << 1) | 1)); - longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), ((desiredEdenBytes << 1) | 1)); + longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), (((usqInt)GIV(edenBytes) << 1) | 1)); + longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), GIV(nilObj)); longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), GIV(nilObj)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = ((((((GIV(preemptionYields) + valuePointer13 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer14 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer14); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), ((RootTableSize << 1) | 1)); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), (((usqInt)RootTableSize << 1) | 1)); /* begin storePointer:ofObject:withValue: */ valuePointer15 = positive64BitIntegerFor(GIV(statProcessSwitch)); if (oopisLessThan(result, GIV(youngStart))) { @@ -45438,12 +45447,12 @@ primitiveVMParameter(void) longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), GIV(nilObj)); longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), ConstZero); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((((((0) + ((IMMUTABILITY + valuePointer21 = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((stackPageByteSize()) << 1) | 1); + valuePointer22 = (((usqInt)(stackPageByteSize()) << 1) | 1); longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer22); /* begin storePointer:ofObject:withValue: */ valuePointer23 = floatObjectOf(statAverageLivePagesWhenMapping()); @@ -45452,13 +45461,13 @@ primitiveVMParameter(void) } longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer24 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = (((VM_PROXY_MAJOR) << 1) | 1); + valuePointer25 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((VM_PROXY_MINOR) << 1) | 1); + valuePointer26 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer26); assert(paramsArraySize == 71); /* begin pop:thenPush: */ @@ -45501,22 +45510,22 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); } if (arg == 7) { - result = ((GIV(statFullGCs) << 1) | 1); + result = (((usqInt)GIV(statFullGCs) << 1) | 1); } if (arg == 8) { result = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); } if (arg == 9) { - result = (((GIV(statIncrGCs)) << 1) | 1); + result = (((usqInt)(GIV(statIncrGCs)) << 1) | 1); } if (arg == 10) { result = (((((GIV(statIncrGCUsecs)) + 500) / 1000) << 1) | 1); } if (arg == 11) { - result = ((GIV(statTenures) << 1) | 1); + result = (((usqInt)GIV(statTenures) << 1) | 1); } if (((arg >= 12) && (arg <= 18))) { result = ConstZero; @@ -45528,43 +45537,43 @@ primitiveVMParameter(void) result = positive64BitIntegerFor(ioUTCStartMicroseconds()); } if (arg == 21) { - result = ((GIV(rootTableCount) << 1) | 1); + result = (((usqInt)GIV(rootTableCount) << 1) | 1); } if (arg == 22) { - result = ((GIV(statRootTableOverflows) << 1) | 1); + result = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); } if (arg == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); } if (arg == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); } if (arg == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); } if (arg == 26) { - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); } if (arg == 27) { - result = ((GIV(statMarkCount) << 1) | 1); + result = (((usqInt)GIV(statMarkCount) << 1) | 1); } if (arg == 28) { - result = ((GIV(statSweepCount) << 1) | 1); + result = (((usqInt)GIV(statSweepCount) << 1) | 1); } if (arg == 29) { - result = ((GIV(statMkFwdCount) << 1) | 1); + result = (((usqInt)GIV(statMkFwdCount) << 1) | 1); } if (arg == 30) { - result = ((GIV(statCompMoveCount) << 1) | 1); + result = (((usqInt)GIV(statCompMoveCount) << 1) | 1); } if (arg == 0x1F) { - result = ((GIV(statGrowMemory) << 1) | 1); + result = (((usqInt)GIV(statGrowMemory) << 1) | 1); } if (arg == 32) { - result = ((GIV(statShrinkMemory) << 1) | 1); + result = (((usqInt)GIV(statShrinkMemory) << 1) | 1); } if (arg == 33) { - result = ((GIV(statRootTableCount) << 1) | 1); + result = (((usqInt)GIV(statRootTableCount) << 1) | 1); } if (arg == 34) { @@ -45572,37 +45581,37 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 35) { - result = ((GIV(statSurvivorCount) << 1) | 1); + result = (((usqInt)GIV(statSurvivorCount) << 1) | 1); } if (arg == 36) { result = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); } if (arg == 37) { - result = ((GIV(statSpecialMarkCount) << 1) | 1); + result = (((usqInt)GIV(statSpecialMarkCount) << 1) | 1); } if (arg == 38) { result = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); } if (arg == 39) { - result = ((GIV(statPendingFinalizationSignals) << 1) | 1); + result = (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1); } if (arg == 40) { - result = ((BytesPerWord << 1) | 1); + result = (((usqInt)BytesPerWord << 1) | 1); } if (arg == 41) { - result = (((6505) << 1) | 1); + result = (((usqInt)(6505) << 1) | 1); } if (arg == 42) { - result = ((GIV(numStackPages) << 1) | 1); + result = (((usqInt)GIV(numStackPages) << 1) | 1); } if (arg == 43) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = ((GIV(edenBytes) << 1) | 1); + result = (((usqInt)GIV(edenBytes) << 1) | 1); } if (arg == 45) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); } if (arg == 46) { result = GIV(nilObj); @@ -45611,17 +45620,17 @@ primitiveVMParameter(void) result = GIV(nilObj); } if (arg == 48) { - result = ((((((GIV(preemptionYields) + result = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); } if (arg == 49) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); } if (arg == 52) { - result = ((RootTableSize << 1) | 1); + result = (((usqInt)RootTableSize << 1) | 1); } if (arg == 56) { result = positive64BitIntegerFor(GIV(statProcessSwitch)); @@ -45651,24 +45660,24 @@ primitiveVMParameter(void) result = ConstZero; } if (arg == 65) { - result = (((((((0) + ((IMMUTABILITY + result = (((usqInt)((((usqInt)((0) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1)) << 1) | 1); } if (arg == 66) { - result = (((stackPageByteSize()) << 1) | 1); + result = (((usqInt)(stackPageByteSize()) << 1) | 1); } if (arg == 68) { result = floatObjectOf(statAverageLivePagesWhenMapping()); } if (arg == 69) { - result = (((statMaxPageCountWhenMapping()) << 1) | 1); + result = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); } if (arg == 70) { - result = (((VM_PROXY_MAJOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); } if (arg == 71) { - result = (((VM_PROXY_MINOR) << 1) | 1); + result = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); } /* begin pop:thenPush: */ longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); @@ -45719,19 +45728,19 @@ primitiveVMParameter(void) GIV(primFailCode) = 0; } if (index == 6) { - result = ((GIV(tenuringThreshold) << 1) | 1); + result = (((usqInt)GIV(tenuringThreshold) << 1) | 1); GIV(tenuringThreshold) = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 23) { - result = ((extraVMMemory << 1) | 1); + result = (((usqInt)extraVMMemory << 1) | 1); extraVMMemory = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; } if (index == 24) { - result = ((GIV(shrinkThreshold) << 1) | 1); + result = (((usqInt)GIV(shrinkThreshold) << 1) | 1); if (arg > 0) { GIV(shrinkThreshold) = arg; /* begin initPrimCall */ @@ -45739,7 +45748,7 @@ primitiveVMParameter(void) } } if (index == 25) { - result = ((GIV(growHeadroom) << 1) | 1); + result = (((usqInt)GIV(growHeadroom) << 1) | 1); if (arg > 0) { GIV(growHeadroom) = arg; /* begin initPrimCall */ @@ -45750,7 +45759,7 @@ primitiveVMParameter(void) if (arg >= 0) { /* 0 turns off the heartbeat */ - result = (((ioHeartbeatMilliseconds()) << 1) | 1); + result = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); ioSetHeartbeatMilliseconds(arg); /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45759,7 +45768,7 @@ primitiveVMParameter(void) if (index == 43) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = ((desiredNumStackPages << 1) | 1); + result = (((usqInt)desiredNumStackPages << 1) | 1); desiredNumStackPages = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45767,7 +45776,7 @@ primitiveVMParameter(void) } if (index == 45) { if (arg >= 0) { - result = ((desiredEdenBytes << 1) | 1); + result = (((usqInt)desiredEdenBytes << 1) | 1); desiredEdenBytes = arg; /* begin initPrimCall */ GIV(primFailCode) = 0; @@ -45775,7 +45784,7 @@ primitiveVMParameter(void) } if (index == 48) { if (arg >= 0) { - result = (((((((((GIV(preemptionYields) + result = (((usqInt)((((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 @@ -45795,7 +45804,7 @@ primitiveVMParameter(void) if (index == 49) { if ((arg >= 0) && (arg <= 0xFFFF)) { - result = (((ioGetMaxExtSemTableSize()) << 1) | 1); + result = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); /* begin initPrimCall */ GIV(primFailCode) = 0; /* begin setMaxExtSemSizeTo: */ diff --git a/stacksrc/vm/vmCallback.h b/stacksrc/vm/vmCallback.h index e320b5ff0f..6c4fdfda5e 100644 --- a/stacksrc/vm/vmCallback.h +++ b/stacksrc/vm/vmCallback.h @@ -1,22 +1,22 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.844 uuid: 4ea8ab78-c8f6-4cf2-a165-23eb85dd66aa + CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1982 uuid: ed988fdd-7019-41f8-9051-e08afa837953 */ #define VM_CALLBACK_INC 1 typedef struct _VMCallbackContext { void *thunkp; - long *stackp; - long *intregargsp; + sqIntptr_t *stackp; + sqIntptr_t *intregargsp; double *floatregargsp; void *savedCStackPointer; void *savedCFramePointer; union { - long valword; + sqIntptr_t valword; struct { int low, high; } valleint64; struct { int high, low; } valbeint64; double valflt64; - struct { void *addr; long size; } valstruct; + struct { void *addr; sqIntptr_t size; } valstruct; } rvs; jmp_buf trampoline; jmp_buf savedReenterInterpreter; diff --git a/tests/smalltalk.ston b/tests/smalltalk.ston index 5a2cedc77a..c6f4d61176 100644 --- a/tests/smalltalk.ston +++ b/tests/smalltalk.ston @@ -3,6 +3,7 @@ SmalltalkCISpec { #testing : { #allTestCases : true, #defaultTimeout : 10, + #hidePassingTests : true, #exclude : { #classes : [ #BrowserTest,